KEMBAR78
Angular js | PPTX
ANGULAR JS
What is Angular JS?
MVC
Angular component
 Controller
 Service
 Factory
 Directives
 Filter
 View
Controller
Setup the scope
View Interaction
CoordinateView and Model
No DOM manipulationangular.module('myApp')
.controller('AddCarCtrl', ['$scope', function($scope) {
//do some stuff
}]);
Controller best practice
 Less controller code
 No application logic
 No DOM manipulation
Service
 Handle non-view logic
 Communicate with server
 Hold data & status
View
 Display the Application
 Declare Binding & Detectives
Create a Service
1.Value
2.Constant
3.Factory
4.Service
5.Providerangular.module('myApp').service('AddCarSvc',function($http,carList) {
//do some stuff
});
Directives
 DOM manipulation
 DOM events
 Functionality( ng-show, ng-hide)
 Widgets
Directives
 Link
 Controller
 Scope
Project work though and hand on
FOUC
Flash of unstyled Content
1.ng-cloak
[ng:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
display: none !important;
}
1.ng-bind
Use ng-bind instead of {{ }}
1.Add spinner
File Structure

Angular js