-
Notifications
You must be signed in to change notification settings - Fork 3k
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.0.0-alpha.1: Cannot read property 'resolveContext' of undefined #2657
Comments
That code is fetching all the locals (resolve data) for a view (controller) As far as I can tell, we couldn't find the right object in the "to path" (which is the path of nested states from the root state down to the transition's target state). This could be caused by a number of things. Can you drop a breakpoint there (in Chrome, use the "pause on exceptions" feature) and report back what is the value of:
If I can reproduce this, I'll get this fixed up ASAP and put into alpha.2 |
As requested: //vs.viewDecl
{
$context:exports.extend.exports.extend
$name:"menu@main.shop"
$type:"ng1"
$uiViewContextAnchor:"main.shop"
$uiViewName:"menu"
controller:"ShopMenuController"
resolveAs:"$resolve"
templateUrl:"shopMenu.html"
}
//vc.viewDecl.$context.name
"main.shop.collection.category"
//$transition$.treeChanges().to.map(function(node) { return node.state.name; })
["", "main", "main.shop", "main.shop.category"]
//$transition$.treeChanges().to.map(function(node) { return node.resolveContext; })
[ResolveContext, ResolveContext, ResolveContext, ResolveContext] If you still need to see the state definitions, let me know and I'll send it as a PM to you. |
I'm attempting to upgrade ui-router to
angular-ui-router#1.0.0-alpha.1
withangular#1.4.7
. Some of our links are throwing errors at the following line:Best I can tell, routes that have a
resolve
option to them ($stateProvider.state('foo',{resolve:{/*...*/}})
) seem to throw this.Any ideas why
common_1.find
would returnundefined
when this route used to work inangular-ui-router#0.2.17
?The text was updated successfully, but these errors were encountered: