Angular – Displaying data and handle events

1. Property Binding Property Binding is to bind the DOM elements’ properties to our components, for example import { Component } from “@angular/core”; import { courseService } from “./courses.service”; @Component({ selector: ‘courses’, template: ` <h2 textConetent = “{{ title }}”><h2> <h1 [textContent] = ‘title’></h1> ` }) export class coursesComponent{ title = ‘list of courses’; } […]

Angular Fundamentals

Angular Fundamentals 1. Installation 2. Component Create a new file under the folder src/app, name it courses.component. import { Component } from “@angular/core”; @Component({ selector: ‘courses’, template: ‘<h2>My Course</h2>’ }) export class courses{ } “Selector” indicates that how user going to use this tag in CSS “template” is the basic HTML¬†for this component, it can […]