Creating component - amresh087/newronaRepos GitHub Wiki
While you are creating component then below files will be created
- app-componet.html
app-component.css
Here we need to write css
app-component.ts
Here we need to write function
app-module.ts
in app.module.ts we need to defined all component which is created
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { TodosComponent } from './Mycomponet/todos/todos.component';
import { TodoItemComponent } from './Mycomponet/todo-item/todo-item.component';
import { AddTodoComponent } from './Mycomponet/add-todo/add-todo.component';
import { FormsModule } from '@angular/forms';
@NgModule({
declarations: [
AppComponent,
TodosComponent,
TodoItemComponent,
AddTodoComponent
],
imports: [
BrowserModule,
AppRoutingModule,
FormsModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
you can access value from modul to html by using interspersion syntax
{{ title }}
Generate component
ng generate component <component name>