Closed tsabirgaliev closed 8 years ago
Modules loaded in-browser are not aware of their moduleIds. In particular, this is problematic for Angular 2 projects with relative component template paths.
Code like this throws 'module' not defined:
'module' not defined
@Component({ moduleId: module.id, selector: "my-component", templateUrl: "my-component.html" }) export class MyComponent { ...
Use __moduleName in Es modules in place of module.id which is for CommonJS modules only.
__moduleName
module.id
Thank you!
Please disregard this PR, my conclusion was based on false positive test.
Modules loaded in-browser are not aware of their moduleIds. In particular, this is problematic for Angular 2 projects with relative component template paths.
Code like this throws
'module' not defined
: