From 1f2adf97e113cdb812ca75897d912d1457c2ba70 Mon Sep 17 00:00:00 2001 From: Ben Sarmiento Date: Thu, 13 Aug 2015 22:12:36 +0800 Subject: [PATCH 1/2] close ul tag (ng-repeat) --- angularjs.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/angularjs.md b/angularjs.md index d06e1fe03..f0e850f2d 100644 --- a/angularjs.md +++ b/angularjs.md @@ -11,6 +11,7 @@ layout: default
  • {{phone.name}}
  • + ### Model (ng-model) @@ -54,7 +55,7 @@ layout: default In controller you call with parameter and will use promises to return data from server. - App.controller('controllerName', + App.controller('controllerName', function(NameService){ NameService.get() .then(function(){}) @@ -64,7 +65,7 @@ In controller you call with parameter and will use promises to return data from App.directive('name', function(){ return { - template: '

    Hello

    ' + template: '

    Hello

    ' } }); From 3588de317cff0232a9833bb84bad70c9ac5005fc Mon Sep 17 00:00:00 2001 From: Ben Sarmiento Date: Thu, 13 Aug 2015 22:14:59 +0800 Subject: [PATCH 2/2] factory -> service (service) --- angularjs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/angularjs.md b/angularjs.md index f0e850f2d..a68dc07b7 100644 --- a/angularjs.md +++ b/angularjs.md @@ -45,7 +45,7 @@ layout: default ### Service - App.factory('NameService', function($http){ + App.service('NameService', function($http){ return { get: function(){ return $http.get(url);