You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to move the html content into .html file and use the templateUrl instead of template. I am getting 404 error. Can you please help me, am i missing anything?
This was rendered by App5 which is written in Angular 6
<div>
<b> Count: {{ count }}</b><br/><br/>
<button (click)="increment()">local increment</button> Send a <b>local</b> increment event. This will
only increase the counter for the current app. <br/>
<button (click)="decrement()">local decrement</button> Send a <b>local</b> decrement event. This will
only decrement the counter for the current app. <br/>
<button (click)="globalIncrement()">global increment</button> Send a <b>global</b> increment event.
This will increase the counter for the current app and all other apps that listen to this event. <br/>
<button (click)="globalDecrement()">global decrement</button> Send a <b>global</b> decrement event.
This will increase the counter for the current app and all other apps that listen to this event. <br/>
</div>
<br />
<a [routerLink]="['/subroute1']" routerLinkActive="active">Angular route 1</a>
<a [routerLink]="['/subroute2']" routerLinkActive="active">Angular route 2</a>
<router-outlet></router-outlet>
`,
})
The text was updated successfully, but these errors were encountered:
What error are you getting?
You need to use templateUrl instead of template.
Where are you putting the selector in the html?
What does you NgModule look like?
I would like to move the html content into .html file and use the templateUrl instead of template. I am getting 404 error. Can you please help me, am i missing anything?
@component({
selector: 'app5',
template: `
<img [src]="angularImg" style="width: 100px;"/>
This was rendered by App5 which is written in Angular 6
})
The text was updated successfully, but these errors were encountered: