Contents tagged with AngularJS 2 Component

  • What is AngularJS 2 component


    Here I want to write of how I grasped what is Angular 2 component building blocks

    Hello everybody,

    I don't know about you, but when I first opened AngularJS 2 component source code, I've become puzzled with question mark of what is AngularJS 2 component?

    Imagine, that you look at this sampe:

    import { Component } from '@angular/core';


    selector: 'my-app',

    template: `<h1>Hello {{name}}</h1>`


    export class AppComponent { name = 'Angular'; }

    and try to figure out what are consisting parts of compoment? After watching on that example and some others example here is conclusion that I've made:

    Do you remember previous fragment of code? … more