Bladeren bron

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

David Leonard 10 jaren geleden
bovenliggende
commit
a8608e62f7
2 gewijzigde bestanden met toevoegingen van 11 en 2 verwijderingen
  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({