Swiip / generator-gulp-angular

Yeoman generator for AngularJS with GulpJS [UNMAINTAINED next iteration is FountainJS]
http://fountainjs.io
3.72k stars 665 forks source link

Directive template not included in build #982

Open redaikidoka opened 8 years ago

redaikidoka commented 8 years ago

Hey, all I have been banging my head against this.

One of my directives (and only one!) is not being included in the build for some reason. I get a "failed to load resource" and a path to where the template file would be. I can manually fix it by converting the .jade file for my template and putting it in the dist/ folder where the app is looking.

My directive's templateurl: ` templateUrl: 'app/components/ilpNav/ilpNav.html',

and just like my other directives, there is a ` app/components/ilpNav/ilpNav.jade file, which I presume is being converted to html.

Here's the templateurl for one of my directives that's working: ` templateUrl: 'app/components/ilpField/ilpField.html',

You can see it's the same format. That's really where the files are in /src.

Any thoughts?

MaxFlower commented 8 years ago

What's in your gulp file. Have You changed something?

redaikidoka commented 8 years ago

Nope, the gulp seems to be working awesome, no tinkering for me. And it seems to be the only directive this is happening with (as above, my directive for ilpField is being found just fine).

is there a capitalization thing I need to be concerned about, or is it the fact that it's just included by an undecorated tag, e.g.

?

wstam88 commented 8 years ago

Do you begin the templateUrl with or without a forward slash? It fails for me when I start the templateUrl with a forward slash.

Swiip commented 8 years ago

Comment the uglify transform in the build and look into the bundle generated for the urls stored in the cache provider. Check also the name of the angular module in which they are added, if you changed the main angular module name, they could be added in a module not loaded.