Comments (7)
Hi @JCDubs: give the following a try. Use tpl.htm instead of tpl.html (currently only the former is supported) but supporting both is on my list of issues to get resolved.
Also, since the path to the template file has to match the module name, I would move your tpl.htm file to /assets/javascripts/header-module/templates.
Does that help?
from angular-template-asset-pipeline.
@craigburke, I tried your suggestions above but it didn't help. I tried placing the test-header-template.tpl.htm file into the assets/javascripts/header-module/templates/ directory. I also tried placing the template file into the assets/javascripts/directives/templates/ directory as well but no joy. Im not sure what else could solve the problem.
from angular-template-asset-pipeline.
@JCDubs alright I'll pull the project and see if I can get it working.
from angular-template-asset-pipeline.
Hi @JCDubs take a look at my pull request, that appears to be working. When I browse to http://localhost:8080/anggrails/assets/header-module/templates/test-header-template.js
I see this:
angular.module('headerModule').run(['$templateCache', function($templateCache) {
$templateCache.put('test-header-template.htm', '<h1>The Template File Works</h1>');
}]);
from angular-template-asset-pipeline.
One thing to keep in mind is that the path that the templates are in matters. If you decide to use the plugin I'd recommend grouping your files by the module name instead of type of object.
/javascripts/module1/controllers.js
/javascripts/module2/controllers.js
instead of
/javascripts/controllers/module1.js
/javascripts/controllers/module2.js
from angular-template-asset-pipeline.
Nice one @craigburke, I have merged your pull request and it works brilliantly. I will take your recommendations for structural standards forward in my angular development and I look forward to implementing angular in the front end of all of my apps, cheers.
from angular-template-asset-pipeline.
@JCDubs great! Happy to help! 😃
from angular-template-asset-pipeline.
Related Issues (20)
- Line breaks are not formatted properly HOT 16
- angular-template-asset-pipeline 2.0.1 does not appear to be working HOT 14
- Plugin poping errors at runtime HOT 4
- Module name problem on windows HOT 16
- File path tokenize fails with the use of GenericAssetFile HOT 5
- Templates do not work in Grails 3 Jar HOT 18
- Allow for module name default HOT 15
- Is it possbile to have multiple template folders? HOT 4
- configOptions take no effect for Grails 3 in build.gradle HOT 3
- Error 500 on generated template js files HOT 3
- Mismatch in path vs cache name HOT 1
- Camel Case HOT 5
- Line ends are broken when template html is minimized for <script> tag HOT 6
- Display issue when using templates HOT 1
- Wrong module name if Grails 3 project name is written with snake case HOT 2
- New properties to add all templates to a single module
- Release 2.4.0 HOT 6
- assets.configOptions.angular is not found when application is run in dev environment (no war)) HOT 1
- CRLF not supported in templates HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-template-asset-pipeline.