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

Friday, 21 October 2016

How to setup environment for Angular2

Setting up a new project on your machine is easy with the QuickStart seed, which is maintained on github.Before you start, Make sure you have node and npm installed
  1. Create a project folder 
  2. Clone  the QuickStart seed into your project folder.
  3. Install npm packages.
  4. Run npm start to launch the sample application.
git clone quickstart cd quickstart npm install npm startcd quickstartnpm installnpm start

app.component.ts :
It is the root component of what will become a tree of nested components as the application evolves.

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

  selector: 'my-app',
  template: `<h1>Hello {{name}}</h1>`
export class AppComponent { name = 'Angular'; }

the root module that tells Angular how to assemble the application
import { NgModule }      from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent }  from './app.component';

  imports:      [ BrowserModule ],
  declarations: [ AppComponent ],
  bootstrap:    [ AppComponent ]
export class AppModule { }

Compiles the application with the JIT compiler & bootstraps the application to run in the browser.

import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule }              from './app.module';

0 coment�rios:

Post a Comment


Online Training

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

Powered by Blogger.

Recent Posts

Find Us On Facebook

Popular Posts