BUILD YOUR OWN
ANGULARJS
Build Your Own Angular
2
©2015 Tero Parviainen
Errata / Submit
Build Your Own AngularJS
Tero Parviainen
ISBN 978-952-93-3544-2
Contents
Introduction
i
How To Read This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ii
Source Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ii
Contributors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ii
Early Access: Errata & Contributing . . . . . . . . . . . . . . . . . . . . .
iii
Contact . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
iii
Version History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
iii
Project Setup
Install The Required Tools
vii
. . . . . . . . . . . . . . . . . . . . . . . . . .
vii
Create The Project Directories . . . . . . . . . . . . . . . . . . . . . . . . viii
Create package.json for NPM . . . . . . . . . . . . . . . . . . . . . . . . . viii
Create Gruntfile.js for Grunt . . . . . . . . . . . . . . . . . . . . . . . . .
ix
“Hello, World!” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ix
Enable Static Analysis With JSHint . . . . . . . . . . . . . . . . . . . . .
ix
Enable Unit Testing With Jasmine, Sinon, and Testem . . . . . . . . . . .
xi
Include Lo-Dash And jQuery . . . . . . . . . . . . . . . . . . . . . . . . . xiv
Define The Default Grunt Task . . . . . . . . . . . . . . . . . . . . . . . .
xv
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi
I
Scopes
1
1 Scopes And Digest
5
Scope Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3
5
Build Your Own Angular
Contents
Watching Object Properties: $watch And $digest . . . . . . . . . . . . . .
6
Checking for Dirty Values . . . . . . . . . . . . . . . . . . . . . . . . . . .
9...