blob: b07768a507aa0f878a03cce97d66a50ef34983e4 [file] [log] [blame]
Matteo Scandolo8cc22e42016-04-12 09:00:04 -07001'use strict';
2
3angular.module('xos.sampleView', [
4 'ngResource',
5 'ngCookies',
Matteo Scandolo8cc22e42016-04-12 09:00:04 -07006 '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 Scandolo2e4c3442016-04-29 10:20:01 -070026 controller: function(Users){
Matteo Scandolo18adcb52016-04-14 12:06:50 -070027
28 this.tableConfig = {
Matteo Scandolo2e4c3442016-04-29 10:20:01 -070029 resource: 'Users'
Matteo Scandolo18adcb52016-04-14 12:06:50 -070030 };
Matteo Scandolo2e4c3442016-04-29 10:20:01 -070031
Matteo Scandolo8cc22e42016-04-12 09:00:04 -070032 }
33 };
34});