Closed
Description
Hi guys,
I'm having some issues with the template, not sure is related to the way how angular-cli load the dependency.
Architecture:
- Angular 2 app generated with angular-cli
- Angular 2 Component linked with npm int the generated app (test-component).
Description:
The generated Angular 2 app throw me the following error when I try to use the linked Angular 2 component :
VM32836:388 Unhandled Promise rejection: Failed to load test.component.html ; Zone: <root> ; Task: Promise.then ; Value: Failed to load test.component.html
.ts of the linked component
@Component({
selector: 'test-component',
templateUrl: './test.component.html',
styleUrls: ['./test.component.css']
})
export class TestComponent { }
If I change the code in the following way it works:
@Component({
selector: 'test-component',
template: require('./test.component.html'),
styles: [require('./test.component.css')]
})
export class TestComponent { }
But I can't use the require and I would like to fix the problem without introducing this change.
OS
Mac OSX
Versions.
angular-cli: 1.0.0-beta.20-4
node: 6.2.2
os: darwin x64