Must Know
Downloading the
Libraries
Agenda
Why Angular JS ?
•
What is AngularJS ?
•
•
•
•
•
<!doctype html>
<html>
<head ng-app >
<title>Exemple 1</title>
<SCRIPT TYPE="text/javascript" src="JS/angular.min.js">
</SCRIPT>
</head>
<body >
<input type="text" ng-model="name" >
<h1>Hello {{name}} </h1>
</body>
</html>
Directives,
Filters and
DataBinding
<!doctype html>
<html>
<head ng-app >
<title>Exemple 1</title>
<SCRIPT TYPE="text/javascript" src="JS/angular.min.js">
</SCRIPT>
</head>
<body >
<input type="text" ng-model="name" >
<h1>Hello {{name}} </h1>
</body>
</html>
Modules ,
Controllers
and Scope.
•
Dependecies
and Services.
var mainApp = angular.module("mainApp", []);
mainApp.factory('MathService', function() {
var factory = {};
factory.multiply = function(a, b) {
return a * b
}
return factory;
});
mainApp.service('CalcService', function(MathService){
this.square = function(a) {
return MathService.multiply(a,a);
}
});
app.provider("message", [function () {
var text = null;
this.setText = function (textString) {
text = textString;
};
this.$get = function(){
return new Message();
}
}]);
angular.module("root", ["services"])
.config(["messageProvider", function (messageProvider) {
messageProvider.setText("Hello world!");
}]);
Routing
•
REST API : https://epitodoexample.herokuapp.com/
<Thank You!>
hmidihamdi7@gmail.com
/+ HamdiHmidiigcien
/hamdi.igc

Ng init | EPI Sousse