Angular

Intro. TypeScript

Angular

  • SPA
  • Component-based approach
  • Runs on desktop and mobile
  • Modular
  • Testable
  • Google

Building blocks

Modules

Components

Directives

Services

Router

Modules

Module

Components

Directives

Services

Router

Directives

<app-post *ngFor="let post of posts"></app-post>
<button myCoolButton>Click Me!</button>
<p *ngIf="amIAdmin">Woohoo, I'm an admin!</p>

Services

Component

Service

Backend

Router

Router

Feed page

Profile page

Let's get started

ng-cli

npm install -g @angular/cli
ng new my-new-app
cd new my-new-app
ng serve

Generate with ng-cli

TypeScript

  • Developed and maintained by Microsoft
  • Strict syntactical superset of JavaScript
  • Rapidly becoming Standard
  • Designed for development of large applications

Pros and cons

  • Improves code maintainability and readability
  • Awesome documentation for your app
  • Static analysis (IDE support + compilation)
  • Syntax sugar
  • More verbose
  • Language configuration
  • Separate package

How to start

npm install -g typescript

Compiling code:

tsc fileName.ts

Project should contain:

tsconfig.json

tsLint

Demo

Useful links

Q & A

Angular. Intro. Typescript

By Pavel Razuvalau

Angular. Intro. Typescript

  • 760