فهرست منبع

Adding state for grabbing Github User data, fixing naming problems with github user factory

David Leonard 10 سال پیش
والد
کامیت
a8608e62f7
2فایلهای تغییر یافته به همراه11 افزوده شده و 2 حذف شده
  1. 10 1
      angular/scripts/app.js
  2. 1 1
      angular/scripts/factories/githubUserFactory.js

+ 10 - 1
angular/scripts/app.js

@@ -10,7 +10,16 @@ var restApp = angular.module('restApp', [
             templateUrl: 'partials/snippets.partial.html',
             controller: 'restAppController',
             data: {
-                pageTitle: 'Sample API data'
+                pageTitle: 'Sample API Data'
+            }
+        })
+
+        .state('githubUser', {
+            url: '/githubUser',
+            templateUrl: 'partials/githubUser.partial.html',
+            controller: 'githubUserController',
+            data: {
+                pageTitle: 'Github User Data'
             }
         });
 });

+ 1 - 1
angular/scripts/factories/githubUserFactory.js

@@ -1,6 +1,6 @@
 'use strict';
 
-restApp.factory('githubUser', function($http) {
+restApp.factory('githubUserFactory', function($http) {
     return {
         get: function() {
             return $http({