Create a Component
To create component,1. first create folder as component.(This is optional . using folder we can make clean & clear
project ).
2.open terminal.
3.run command ng generate component [component name] .( short form => ng g c [component name]).
4.Now open home u can see
- home.component.css
- home.component.html
- home.component.spec.cs
- home.component.ts
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.css']
})
export class HomeComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}
No comments:
Post a Comment