Angular 5 is the latest framework for building web applications using typescript. Recently, angular team is skipped the version 3.x because, router package is shipped with 3.x previously, so instead of putting into 3.x, choose to move to 4.x. Current latest version is 5

Tuesday, 15 November 2016

Templates in Angular 2

Angular 2.x templates are similar to Angular 1.x templates  except few syntactical changes.


Angular uses HTML language for templates.
         <h1>Angular Tutorials by Srinivas Nidadavolu</h1>

Interpolation : 

 Angular uses expression (Double curly braces)

         <h1>Angular Tutorials by {{}}</h1>

it print 

Angular Tutorials by Srinivas Nidadavolu

<p>5+5 Sum is {{5+5}}</p>

it print 

 5+5 Sum is 10

Another example :

lets create a basic component and it has name property that we are going to use in our template.


export class MyAppComponent {
name = 'Srini'

in the template , we can use name


it prints in the html page





Online Training

Your Name :
Your Email: (required)
Your Message: (required)

Powered by Blogger.

Recent Posts

Find Us On Facebook

Popular Posts