Matteo Scandolo | d2044a4 | 2017-08-07 16:08:28 -0700 | [diff] [blame] | 1 | |
| 2 | /* |
| 3 | * Copyright 2017-present Open Networking Foundation |
| 4 | |
| 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | * you may not use this file except in compliance with the License. |
| 7 | * You may obtain a copy of the License at |
| 8 | |
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | |
| 11 | * Unless required by applicable law or agreed to in writing, software |
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | * See the License for the specific language governing permissions and |
| 15 | * limitations under the License. |
| 16 | */ |
| 17 | |
| 18 | |
Matteo Scandolo | 7d539d3 | 2016-05-25 08:53:11 -0700 | [diff] [blame] | 19 | 'use strict'; |
| 20 | |
| 21 | angular.module('xos.subscribers', [ |
| 22 | 'ngResource', |
| 23 | 'ngCookies', |
| 24 | 'ui.router', |
| 25 | 'xos.helpers' |
| 26 | ]) |
| 27 | .config(($stateProvider) => { |
| 28 | $stateProvider |
| 29 | .state('user-list', { |
| 30 | url: '/', |
| 31 | template: '<subscribers-list></subscribers-list>' |
| 32 | }); |
| 33 | }) |
| 34 | .config(function($httpProvider){ |
| 35 | $httpProvider.interceptors.push('NoHyperlinks'); |
| 36 | }) |
| 37 | .directive('subscribersList', function(){ |
| 38 | return { |
| 39 | restrict: 'E', |
| 40 | scope: {}, |
| 41 | bindToController: true, |
| 42 | controllerAs: 'vm', |
| 43 | templateUrl: 'templates/subscribers-list.tpl.html', |
Matteo Scandolo | 03d8b8e | 2016-05-25 17:37:37 -0700 | [diff] [blame] | 44 | controller: function(){ |
Matteo Scandolo | 7d539d3 | 2016-05-25 08:53:11 -0700 | [diff] [blame] | 45 | |
Matteo Scandolo | 7d539d3 | 2016-05-25 08:53:11 -0700 | [diff] [blame] | 46 | this.smartTableConfig = { |
| 47 | resource: 'Subscribers' |
| 48 | }; |
Matteo Scandolo | 7d539d3 | 2016-05-25 08:53:11 -0700 | [diff] [blame] | 49 | } |
| 50 | }; |
| 51 | }); |