i would like use nested component. This fine tutorial shows, how could i do that:
https://www.themarketingtechnologist.co/building-nested-components-in-angular-2/
My problem is, that my template for the nested component will not be found: I have try
template: '<h2>HALLO</h2>'
But i would like use extern file: task.component.html like this:
template: 'file.component.html'
Output is, that simply
task.component.html
will be displayed and when i try:
templateUrl: 'file.component.html'
i get error:
Uncaught (in promise): Failed to load task.component.html
Here is my code:
ChildComponent:
@Component({
selector: 'edit-task',
templateUrl: 'file.component.html'
})
export class FileFormat{}
ParentComponent:
@Component({
moduleId: module.id,
selector: 'my-app',
templateUrl: 'app.template.html',
directives: [FileFormat]
})
export class FileFormat{}