{"id":20314308,"url":"https://github.com/normandy72/transition-events","last_synced_at":"2026-05-09T07:35:53.853Z","repository":{"id":153902841,"uuid":"592314482","full_name":"Normandy72/Transition-Events","owner":"Normandy72","description":"Router State Transition Events in AngularJS. Coursera course \"Single Page Web Applications with AngularJS\" by Yaakov Chaikin.","archived":false,"fork":false,"pushed_at":"2023-01-23T13:48:13.000Z","size":96,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-04T08:44:54.195Z","etag":null,"topics":["angular","angularjs","css","css3","html","html5","javascript","js"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Normandy72.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-23T13:18:34.000Z","updated_at":"2023-01-23T13:31:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"74c0fb9c-e95d-410e-8f64-c35e982c6b1f","html_url":"https://github.com/Normandy72/Transition-Events","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Normandy72/Transition-Events","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Normandy72%2FTransition-Events","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Normandy72%2FTransition-Events/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Normandy72%2FTransition-Events/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Normandy72%2FTransition-Events/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Normandy72","download_url":"https://codeload.github.com/Normandy72/Transition-Events/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Normandy72%2FTransition-Events/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32811653,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","angularjs","css","css3","html","html5","javascript","js"],"created_at":"2024-11-14T18:14:44.069Z","updated_at":"2026-05-09T07:35:53.837Z","avatar_url":"https://github.com/Normandy72.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Router State Transition Events\n## $stateChangeStart\n* Fires when state change transition begins.\n* Use `event.preventDefault()` to prevent the transition from occuring.\n```\n$rootScope.$on('$stateChangeStart',\n                function(event, toState, toParams, fromState, fromParams, options){\n                    ...\n                }\n);\n```\n## $stateChangeSuccess\n* Fired once the state transition is complete.\n```\n$rootScope.$on('$stateChangeSuccess',\n                function(event, toState, toParams, fromState, fromParams){\n                    ...\n                }\n);\n```\n## $stateChangeError\n* Fires when an error occurs during transition.\n```\n$rootScope.$on('$stateChangeError',\n                function(event, toState, toParams, fromState, fromParams, error){\n                    ...\n                }\n);\n```\n***\n#### _Summary_\n* ui-router exposes numerous state change events that our code is able to listen for.\n* All ui-router events are fired on the $rootScope.\n* $stateChangeStart - starts the state transition. Call `event.preventDefault()` to prevent the transition.\n* $stateChangeSuccess indicates a successful transition end.\n* $stateChangeError indicates that the transition failed, including having errors in the resolve. Listen for this event to catch ALL errors during state changes.\n***","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnormandy72%2Ftransition-events","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnormandy72%2Ftransition-events","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnormandy72%2Ftransition-events/lists"}