| angular.module('xos.dashboardManager', [ |
| .config(($stateProvider) => { |
| .state('manage-user-dashboards', { |
| template: '<user-dashboards></user-dashboards>' |
| .state('add-dashboards', { |
| template: '<dashboard-form></dashboard-form>' |
| .state('edit-dashboards', { |
| template: '<dashboard-form></dashboard-form>' |
| .config(function($httpProvider){ |
| $httpProvider.interceptors.push('NoHyperlinks'); |
| .service('UserDashboards', function($http, $q){ |
| $http.get('/api/utility/dashboards') |
| return {$promise: d.promise}; |
| this.update = (dashboard) => { |
| $http.post('/api/utility/dashboards/', dashboard) |
| return {$promise: d.promise}; |