Sha256: 03f1695430429aa4c7db1290c892f4b36a8722e461673c946902f15804c35d6e
Contents?: true
Size: 1.04 KB
Versions: 4
Compression:
Stored size: 1.04 KB
Contents
/** * @ngdoc object * @name Bastion.capsule-content.config * * @requires $stateProvider * * @description * Used for systems level configuration such as setting up the ui state machine. */ angular.module('Bastion.capsule-content').config(['$stateProvider', '$urlRouterProvider', function ($stateProvider, $urlRouterProvider) { // Catch the url to prevent the router to perform redirect. $urlRouterProvider.when('/smart_proxies/:proxyId', ['$match', '$stateParams', function ($match, $stateParams) { $stateParams.pageName = 'smart_proxies/detail'; return true; }]); // Add rule to redirect links on the smart proxy detail page. // Changing state doesn't work there since there's no <ui-view> element there $urlRouterProvider.rule(function ($injector, $location) { var $stateParams = $injector.get('$stateParams'), $window = $injector.get('$window'); if ($stateParams.pageName === 'smart_proxies/detail') { $window.location.href = $location.path(); } }); }]);
Version data entries
4 entries across 4 versions & 1 rubygems