I am building an angular plugin named breadcrumb here, it works fine until I update ui-router version to '1.0.0-beta.2'. the cause is that I can't get resolved data from $state.$current.
in html
specify display name property to data.displayName in html <breadcrumbs display-name-property="data.displayName"></breadcrumbs>
state config
displayName is dynamic .state('app.dict.list.tree', { ... data: { displayName: '{{title}}' }, resolve: { title: ['$transition$', $transition$ => $transition$.params().title], } })
directive link function
i use $interpolate service to compile propertyReference(in this case '{{title}}') with the context $state.$current.locals.global. var currentState = $state.$current; interpolationContext = (typeof currentState.locals !== 'undefined') ? currentState.locals.globals : currentState; displayName = $interpolate(propertyReference)(interpolationContext);
update ui-router to the latest version, this code won't work anymore, currentState.locals is undefined, and I can't find a way to access resolved data in currentState object.
does anybody know how to do it? any help will be appreciated.