Skip to content

Generated directive won't work in prod #2294

@dhaazen

Description

@dhaazen
  • I understand that GitHub issues are not for tech support, but for questions specific to this generator, bug reports, and feature requests.
Item Version
generator-angular-fullstack 4.1.0
Node 4.4.5
npm 3.10.5
Operating System OS X
etc etc
Item Answer
Transpiler Babel
Markup HTML
CSS CSS
Router ngRoute
Client Tests Mocha
DB SQL
Auth N
etc etc

When generating a directive and including html the generated code uses:

      templateUrl: 'app/myDirective/myDirective.html',

which when bundled breaks because the path doesn't exist.

This can be resolved by simply changing the line to

      template: require('./myDirective.html'), 

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions