Getting Started With AngularJS
20
-
Upload
omnia-helmi -
Category
Software
-
view
405 -
download
1
description
What is AngularJS ? Why Angular? Angular Vs Backbone Getting Started With AngularJS ( Directives - Modules- Expressions - Controllers - Model - Filters - Create Directives - services - Unit Testing ) The code example here:- https://github.com/OmniaGM/learn_AngularJS
Transcript of Getting Started With AngularJS
- AngularJS By: Omnia Gamal email :- [email protected] twitter @Omnia_G
- Agenda What is AngularJS ? Why Angular? Angular Vs Backbone Getting Started With AngularJS
- What is AngularJS ? is an open-source MVC framework single-page applications maintained by Google
- Why AngularJS ? helps you organize your JavaScript helps create responsive (as in fast) websites. plays well with jQuery is easy to test
- Angular Vs Backbone keys: o size (BB 18kb vs angular 77kb but ) o memory management o nested model o binging (angular is better than why?) o RESTFUL ( angular will need ngResource ) o Validation o Template Support
- Getting Started With AngularJS Agenda: o Directives o Modules o Expressions o Controllers o Model o Filters o Create Directives o services o Unit Testing
- Directives Ex:- ng-app ng-controller ng-show ng-hide ng-repeat ng-model
- Modules angular.module('readingListApp', [])
- Expressions
- Controllers & Model
- Filters
- Create Directives restrict templeate or templateUrl scope (Isolated Scope & Binding) controller controllerAs
- Services $http injector (if you want to read more about dependency injection in JS http://krasimirtsonev.com/blog/article/Dependency-injection-in-JavaScript)
- Code Example
- Unit Testing
- Karma :- (previously known as Testacular) o is Googles JavaScript test runner o the natural choice for AngularJS o it is also test framework agnostic (What that mean?) Jasmine :- (is the best choise for many and It will be our choice for testing now) o Its syntax is quite similar to that of RSpec Bower :- o is a package manager that helps you find and install all your application dependencies o It runs over git, much like Rails bundler
- Yeoman :- o is a toolset containing 3 core components: i. Grunt ii. Bower iii. the scaffolding tool Yo o Yo generates boilerplate code with the help of generators and automatically configures Grunt and Bower for your project. You can find generators for almost any JavaScript framework (Angular, Backbone, Ember, etc.) o generator-angular
- Angular Mock angular.mock o module o inject o services $controller $rootScope $httpBackend
- Ref :- Code :- https://github.com/OmniaGM/learn_AngularJS AngularJS screencasts hosted by John Lindquist, JetBrains Evangelist + Productivity addict. codeschool - shaping up with angularJS Your First AngularJS App : Scaffolding, Building, and Testing Why AngularJS is generally better in Angular vs Ember vs backbone