Directive in Angular || ngFor Angular Fundamentals
In this video,I explained directive in Angular. Feel free to comment and like the video. For more, please subscribe and press the BELL icon. Please visit my Angular Playlist. Please visit my YouTube Videos. #directive #ngFor #angular
The code is as follows -
ts file -
import { Component } from '@angular/core';
@Component ({
selector: 'courses',
template: `
<ul start=5>
<li *ngFor= "let course of courses">
{{ course }}
</li>
</ul>
`
})
export class CoursesComponent {
courses = ["HTML", "CSS","JS","PHP","AJS"];
}
The code is as follows -
ts file -
import { Component } from '@angular/core';
@Component ({
selector: 'courses',
template: `
<ul start=5>
<li *ngFor= "let course of courses">
{{ course }}
</li>
</ul>
`
})
export class CoursesComponent {
courses = ["HTML", "CSS","JS","PHP","AJS"];
}
Comments
Post a Comment