{"action":"created","issue":{"url":"https://api.github.com/repos/angular-ui/ui-router/issues/2891","repository_url":"https://api.github.com/repos/angular-ui/ui-router","labels_url":"https://api.github.com/repos/angular-ui/ui-router/issues/2891/labels{/name}","comments_url":"https://api.github.com/repos/angular-ui/ui-router/issues/2891/comments","events_url":"https://api.github.com/repos/angular-ui/ui-router/issues/2891/events","html_url":"https://github.com/angular-ui/ui-router/issues/2891","id":167607954,"number":2891,"title":"Unknown provider: $transitionsProvider","user":{"login":"xkeshav","id":415219,"avatar_url":"https://avatars.githubusercontent.com/u/415219?v=3","gravatar_id":"","url":"https://api.github.com/users/xkeshav","html_url":"https://github.com/xkeshav","followers_url":"https://api.github.com/users/xkeshav/followers","following_url":"https://api.github.com/users/xkeshav/following{/other_user}","gists_url":"https://api.github.com/users/xkeshav/gists{/gist_id}","starred_url":"https://api.github.com/users/xkeshav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xkeshav/subscriptions","organizations_url":"https://api.github.com/users/xkeshav/orgs","repos_url":"https://api.github.com/users/xkeshav/repos","events_url":"https://api.github.com/users/xkeshav/events{/privacy}","received_events_url":"https://api.github.com/users/xkeshav/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-26T13:32:32Z","updated_at":"2016-07-28T05:56:27Z","closed_at":"2016-07-28T05:56:27Z","body":"running an angular js app with gulp \r\n\r\n - angular v 1.5.8 \r\n - angular-ui.router v 0.2.18\r\n\r\n**index.module.js**\r\n```\r\n(function() {\r\n  'use strict';\r\n\r\n  angular\r\n    .module('app', ['ngAnimate', 'ngCookies', 'ngTouch', 'ngSanitize', 'ngMessages', 'ngAria', 'ngResource', 'ui.router', 'ui.bootstrap', 'login']);\r\n\r\n})();\r\n```\r\n\r\n**index.run.js** \r\n\r\n```\r\nangular\r\n    .module('app')\r\n    .run(['$rootScope', '$state', '$timeout', '$log', '$transitions', \r\n        function($rootScope, $state, $timeout, $log, $transitions) {\r\n         var requiresAuthCriteria = {\r\n                to: function(state) {\r\n                    return state.data && state.data.requiresAuth;\r\n                }\r\n            };\r\n\r\n            var redirectToLogin = function($transition$, $injector) {\r\n                var AuthService = $injector.get('AuthService');\r\n                if (!AuthService.isAuthenticated()) {\r\n                    return $state.target('login', undefined, {\r\n                        location: false\r\n                    });\r\n                } else {\r\n                    var roles = $transition$.to().data.authorizedRoles;\r\n                    if (!AuthService.isAuthorized(roles)) {\r\n                        $log.debug('Not Authorized');\r\n                        return $state.target('index', undefined, {\r\n                            location: false\r\n                        });\r\n                    }\r\n                }\r\n            };\r\n\r\n            $transitions.onBefore(requiresAuthCriteria, redirectToLogin, {\r\n                priority: 10\r\n            });\r\n\r\n            $transitions.onStart({\r\n                to: '**'\r\n            }, function($transition$) {\r\n                $log.debug('Transition #' + $transition$.$id + ': B) onStart to: '+ $transition$.to().name);\r\n            });\r\n});\r\n\r\n````\r\nbut it constantly giving error in console \r\n\r\n> Error: [$injector:unpr] Unknown provider: $transitionsProvider <- $transitions\r\n\r\nKindly guide me what's wrong here?"},"comment":{"url":"https://api.github.com/repos/angular-ui/ui-router/issues/comments/235805674","html_url":"https://github.com/angular-ui/ui-router/issues/2891#issuecomment-235805674","issue_url":"https://api.github.com/repos/angular-ui/ui-router/issues/2891","id":235805674,"user":{"login":"xkeshav","id":415219,"avatar_url":"https://avatars.githubusercontent.com/u/415219?v=3","gravatar_id":"","url":"https://api.github.com/users/xkeshav","html_url":"https://github.com/xkeshav","followers_url":"https://api.github.com/users/xkeshav/followers","following_url":"https://api.github.com/users/xkeshav/following{/other_user}","gists_url":"https://api.github.com/users/xkeshav/gists{/gist_id}","starred_url":"https://api.github.com/users/xkeshav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xkeshav/subscriptions","organizations_url":"https://api.github.com/users/xkeshav/orgs","repos_url":"https://api.github.com/users/xkeshav/repos","events_url":"https://api.github.com/users/xkeshav/events{/privacy}","received_events_url":"https://api.github.com/users/xkeshav/received_events","type":"User","site_admin":false},"created_at":"2016-07-28T05:56:27Z","updated_at":"2016-07-28T05:56:27Z","body":"transitions hook has been deprecated in ui-router 0.2.18, now again $stateChangeStart works which was removed in alpha version of ui.router.\r\n\r\nthis is really ridiculous. once you remove in version than in next version you remove the new functionality and add the previous one. :(\r\n\r\n"}}
{"actor":{"display_login":"xkeshav"}}