Angular Crash Course

#4



Getting Used to

AngularJS

 

Gias Kay Lee

@gsklee / gsklee.im

Angular Crash Course

#4



 

 

 

Introduction to AngularJS

Getting Started with AngularJS

Anatomy of AngularJS

Getting Used to AngularJS

Getting Used to

AngularJS


§ Ditching jQuery §

Say Goodbye to Underscore

Deploying Your Project

Showcasing

Meet jqLite

http://docs.angularjs.org/api/angular.element

Important Tips #1



Only Use jqLite in Directives

Example: Class Toggling



https://gist.github.com/gsklee/8464060

Important Tips #2



Look Twice and

Maybe You Won't Need it

Example: Making a Keytrap

Important Tips #3



Making Good Use of $event

Example: Set Event Boundary



https://gist.github.com/gsklee/8464767

Important Tips #4



The API is Not Quite the Same

with jQuery

Example: querySelectorAll

Advanced Directive Authoring

Example: Transclusion

Example: Require

Getting Used to

AngularJS


Ditching jQuery

§ Say Goodbye to Underscore §

Deploying Your Project

Showcasing

Underscore

http://underscorejs.org/

Pro Tips #1



Use $filter

Example: Data Filtering



https://gist.github.com/gsklee/8465752

Pro Tips #2



Roll Your Own Filter

Example: Pagination

Getting Used to

AngularJS


Ditching jQuery

Say Goodbye to Underscore

§ Deploying Your Project §

Showcasing

Performance Finetuning

For the Backend?



...Get SPDY

...Get SPDY

...Get SPDY!

For the Frontend...



- Common Grunt tasks + ngmin

- Be smart about your watchers; no deep comparison

- Write good codes

For the Hardcore

http://blog.scalyr.com/2013/10/31/angularjs-1200ms-to-35ms/

SEO

http://www.yearofmoo.com/2012/11/angularjs-and-seo.html

Prerender.io

https://prerender.io/

SEO.js

http://getseojs.com/

Getting Used to

AngularJS


Ditching jQuery

Say Goodbye to Underscore

Deploying Your Project

§ Showcasing §

KKTIX

https://kktix.com/

Built with AngularJS

http://builtwith.angularjs.org/

YouTube TV

https://tv.youtube.com/

Questions?

ng-conf

http://ng-conf.org/