Ng init | EPI Sousse

  • Published on
    22-Feb-2017

  • View
    335

  • Download
    0

Embed Size (px)

Transcript

  • Must Know

  • Downloading the Libraries

  • Agenda

  • Why Angular JS ?

  • What is AngularJS ?

  • Exemple 1

    Hello {{name}}

  • Directives, Filters and DataBinding

  • Exemple 1

    Hello {{name}}

  • 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/

  • https://egghead.io/http://www.w3schools.com/angular/http://www.w3schools.com/angular/http://www.w3schools.com/angular/

  • hmidihamdi7@gmail.com

    /+ HamdiHmidiigcien

    /hamdi.igc