Skip to content

Instantly share code, notes, and snippets.

@nonlogos
Last active October 19, 2016 19:43
Show Gist options
  • Save nonlogos/8f4c2a737b562304e663c0474dfa0067 to your computer and use it in GitHub Desktop.
Save nonlogos/8f4c2a737b562304e663c0474dfa0067 to your computer and use it in GitHub Desktop.
Start to finish guide to Angular 2 based on Udemy course

1. Set up a new project with command line tool

Command line tool stuff

install angular cli tool

npm install -g angular-cli

Create a new angular project

ng new first-app //ng new name of the project

Starts angular development server locally and builds the app

ng serve Go to localhost:4200 to view the page

2. Typescript

3. Angular modules

Components

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

//decorator @Component({ selector: 'app-root', //How we want to insert it into our html code templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent {

} `

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment