diff --git a/app/app.css b/app/app.css index 48e881d4ec..82b867b4fd 100644 --- a/app/app.css +++ b/app/app.css @@ -23,3 +23,25 @@ content: "|"; padding-right: 0.3em; } + +#followers { + font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; + border-collapse: collapse; + width: 100%; +} + +#followers td, #followers th { + border: 1px solid #ddd; + padding: 8px; +} + +#followers tr:nth-child(even){background-color: #f2f2f2;} + +#followers tr:hover {background-color: #ddd;} + +#followers th { + padding-top: 12px; + padding-bottom: 12px; + text-align: left; + background-color: #4CAF50; + color: white; \ No newline at end of file diff --git a/app/app.js b/app/app.js index 6ea2401bcd..ebf8fb67da 100644 --- a/app/app.js +++ b/app/app.js @@ -5,7 +5,8 @@ angular.module('myApp', [ 'ngRoute', 'myApp.view1', 'myApp.view2', - 'myApp.version' + 'myApp.version', + 'core.followers' ]). config(['$locationProvider', '$routeProvider', function($locationProvider, $routeProvider) { $locationProvider.hashPrefix('!'); diff --git a/app/components/version/version.js b/app/components/version/version.js index cb7a10f9db..eff8e80945 100644 --- a/app/components/version/version.js +++ b/app/components/version/version.js @@ -5,4 +5,4 @@ angular.module('myApp.version', [ 'myApp.version.version-directive' ]) -.value('version', '0.1'); +.value('version', '1.0'); diff --git a/app/core/core.module.js b/app/core/core.module.js new file mode 100644 index 0000000000..ada195fb85 --- /dev/null +++ b/app/core/core.module.js @@ -0,0 +1,4 @@ +'use strict'; + +// Define the `core` module +angular.module('core', ['core.followers'); \ No newline at end of file diff --git a/app/core/followers/followers.module.js b/app/core/followers/followers.module.js new file mode 100644 index 0000000000..52c91ceecd --- /dev/null +++ b/app/core/followers/followers.module.js @@ -0,0 +1,4 @@ +'use strict'; + +// Define the `core.followers` module +angular.module('core.followers', ['ngResource']); \ No newline at end of file diff --git a/app/core/followers/followers.service.js b/app/core/followers/followers.service.js new file mode 100644 index 0000000000..fb6f1ffba1 --- /dev/null +++ b/app/core/followers/followers.service.js @@ -0,0 +1,15 @@ +'use strict'; + +angular. + module('core.followers'). + factory('Followers', ['$resource', + function($resource) { + return $resource('https://api.github.com/users/:githubId/followers', {}, { + query: { + method: 'GET', + params: {githubId: 'octocat'}, + isArray: true + } + }); + } + ]); \ No newline at end of file diff --git a/app/index.html b/app/index.html index ec9da03650..a5824f1708 100644 --- a/app/index.html +++ b/app/index.html @@ -15,10 +15,10 @@
-