Matteo Scandolo | 8cc22e4 | 2016-04-12 09:00:04 -0700 | [diff] [blame] | 1 | 'use strict'; |
| 2 | |
| 3 | angular.module('xos.sampleView', [ |
| 4 | 'ngResource', |
| 5 | 'ngCookies', |
Matteo Scandolo | 8cc22e4 | 2016-04-12 09:00:04 -0700 | [diff] [blame] | 6 | 'ui.router', |
| 7 | 'xos.helpers' |
| 8 | ]) |
| 9 | .config(($stateProvider) => { |
| 10 | $stateProvider |
| 11 | .state('user-list', { |
| 12 | url: '/', |
| 13 | template: '<users-list></users-list>' |
| 14 | }); |
| 15 | }) |
| 16 | .config(function($httpProvider){ |
| 17 | $httpProvider.interceptors.push('NoHyperlinks'); |
| 18 | }) |
| 19 | .directive('usersList', function(){ |
| 20 | return { |
| 21 | restrict: 'E', |
| 22 | scope: {}, |
| 23 | bindToController: true, |
| 24 | controllerAs: 'vm', |
| 25 | templateUrl: 'templates/users-list.tpl.html', |
Matteo Scandolo | 2e4c344 | 2016-04-29 10:20:01 -0700 | [diff] [blame] | 26 | controller: function(Users){ |
Matteo Scandolo | 18adcb5 | 2016-04-14 12:06:50 -0700 | [diff] [blame] | 27 | |
| 28 | this.tableConfig = { |
Matteo Scandolo | 2e4c344 | 2016-04-29 10:20:01 -0700 | [diff] [blame] | 29 | resource: 'Users' |
Matteo Scandolo | 18adcb5 | 2016-04-14 12:06:50 -0700 | [diff] [blame] | 30 | }; |
Matteo Scandolo | 2e4c344 | 2016-04-29 10:20:01 -0700 | [diff] [blame] | 31 | |
Matteo Scandolo | 8cc22e4 | 2016-04-12 09:00:04 -0700 | [diff] [blame] | 32 | } |
| 33 | }; |
| 34 | }); |