0% found this document useful (0 votes)
203 views

Angular 2 Quick Reference PDF

Uploaded by

Blackmorth
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
203 views

Angular 2 Quick Reference PDF

Uploaded by

Blackmorth
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 8
e016 ‘Angular Cheat Sheet ANGULAR CHEAT SHEET ‘A quick guide ta Angular syntax. This cheat sheet is provisional and may change. Angular 2 is currently in Release Candidate, Angular for TypeScript Cheat Sheet (v2.0.0-rc.2) import {bootstrap} from Ee) UTE! sootstrap Bootstraps an application with ppcomponent, (MyService, { provide: ... }]}; MyAppComponent as the root component anc configures the DI providers, Beco nicd Binds property value to the result of expression Firstname
Binds attribute role to the result of expression nyariarole
button (click)="readrainbow(Sevent)">

tiel lo {{ponyname} }

...

employer: {{employer?. conpanyName}

100" height hipsstangularlldoestsalostiguidechoatshoot ml Binds style property width tothe result of expression mysize in pixels. Units are optional Calls method readRainbow when e ick event is triggered on this button element (or its children) and passes in the event object. Binds a property to an interpolatec string, eg. "Hello Seabiscuit’ Equivalent to:
Binds text content to an interpolatec string, e.4. “Hello Seabiscuit’ Sets up two-way data binding Equivalent to: Creates a local variable movieplayer that provides access tothe video element instance in data-binding and event-binding expressions in the current template. The * symbol means that the current element will be turned into ar embedded template. Equivalent to: