How do you define transition between two states in angular?
Answer / Rajeev Sharma
In AngularJS, transitions are defined using a combination of state, stateTransition and animation rules within the $stateProvider. Here's an example of defining a transition from 'home' to 'about':n```javascriptn$stateProvidern .state('about', { /* ... */ })n .state('home', {n views: {n 'main': {n templateUrl: 'home.html',n controller: 'HomeCtrl'n }n },n transition: {n to: 'about',n notify: true,n onEnter: function($rootScope) {n $rootScope.$broadcast('transitionStart');n },n onExit: function() {n // Perform any cleanup or save state heren }n }n })n```
| Is This Answer Correct ? | 0 Yes | 0 No |
How to bind selection box with options in the angular js?
How is AngularJS Compilation Different From Other JavaScript Frameworks?
How to enable and disable buttons with using condition?
What is activatedroutesnapshot in angular 2?
What is json web token in angularjs?
What is export array in angular 2?
What are the key components of angular 2?
Is angular 4 services which traverse the dom looking for attributes?
What is event binding in angular?
What is auto bootstrap process in AngularJS?
How to validate data in angular js?
What do you understand by rest in angular?