Component in Angular || Angular Fundamentals

In this video,I explained Component in Angular. Feel free to comment. For more, please subscribe and press the BELL icon. Please visit my Angular Playlist. Please visit my YouTube Videos. The code is as follows -

courses.component.ts - 
import { Component } from '@angular/core';

@Component ({
  selector: 'courses',  //CSS Selector
  template: '<p> This is my own template </p> <b> <i> Courses </i> </b>'
})

export class CoursesComponent {

}

app.module.ts - 
import { CoursesComponent } from './courses.component';   // add this line

@NgModule({
  declarations: [
    AppComponent,
    CoursesComponent        // add this line
  ],


app.component.html - 
<h1> Angular Fundamentals </h1>

<courses> </courses>



Comments

Popular posts from this blog

Alert Dialog Box in JS || JavaScript Dialog Box

HTML - Frameset Tag in html

Indian Flag || Indian Flag using HTML CSS