angularjs ui-router – how to build master state which is global across app

The approach you took in your plunker is close. @ben-schwartz’s solution demonstrates how you’d set defaults in your root state for the three essentially-static views. The thing missing in your plunker is that your child states still need to reference the top container view. .state(‘root’,{ url: ”, views: { ‘header’: { templateUrl: ‘header.html’, controller: ‘HeaderCtrl’ … Read more

Difference between $state.transitionTo() and $state.go() in Angular ui-router

Are you referring to the AngularUI Router? If so, the wiki specifies the differences: $state.go(to [, toParams] [, options]) Returns a Promise representing the state of the transition. Convenience method for transitioning to a new state. $state.go calls $state.transitionTo internally but automatically sets options to { location: true, inherit: true, relative: $state.$current, notify: true }. … Read more

Angular bootstrap datepicker date format does not format ng-model value

Although similar answers have been posted I’d like to contribute what seemed to be the easiest and cleanest fix to me. Assuming you are using the AngularUI datepicker and your initial value for the ng-Model does not get formatted simply adding the following directive to your project will fix the issue: angular.module(‘yourAppName’) .directive(‘datepickerPopup’, function (){ … Read more

Directing the user to a child state when they are transitioning to its parent state using UI-Router

First, add a property to the ‘manager.staffDetail.view’ state of abstract:true. This isn’t required, but you want to set this since you’d never go to this state directly, you’d always go to one of it’s child states. Then do one of the following: Give the ‘manager.staffDetail.view.schedule’ state an empty URL. This will make it match the … Read more