AngularJS - Passing values among components
Simple example to explain how we can pass values from one component to another component.
Simple example to explain how we can pass values from one component to another component.
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-built-in-directives-demo',
templateUrl: './built-in-directives-demo.component.html',
styleUrls: ['./built-in-directives-demo.component.css']
})
export class BuiltInDirectivesDemoComponent implements OnInit {
items= ['A', 'B', 'C', 'D'];
timeOfDay= 'morning';
constructor() { }
ngOnInit() {
}
}
Template using Directives
Angular application is composed of modules and every angular application will have at least one module in form of a class which is referred as the root module and conventionally it is named “