Reputation: 27
I have an Angular version 2 my components is working without errors but now him don`t render template, early it is working
My component
import template from "./edit.html";
import { Subject } from "rxjs";
@Component({
selector: "adminOffersEdit",
template,
})
I don't changed code, Angular2 render path to template
How i can fix this ?
I try recompiling all components, its`not work
I try add `templateUrl: "./edit.html" and i get result
Upvotes: 0
Views: 47
Reputation: 283
Angular doesn't read all html by default, you have to mention html path inside templateUrl. In your case the code should be..
import { Subject } from "rxjs";
@Component({
selector: "adminOffersEdit",
templateUrl: "./edit.html"
})
Now with that angular knows where your html code is, hopefully this should work.
Upvotes: 0
Reputation: 97140
Just set the templateUrl
directly in your component. There's no need to import it:
import { Subject } from "rxjs";
@Component({
selector: "adminOffersEdit",
templateUrl: "./edit.html",
})
Upvotes: 2