我正在尝试routeSegmentProvider
在构建路线时查找当前位置,因为其中一条路线设置不正确。有什么方法可以让我在树中获得当前位置?
这基本上是我想要做的......
var routeProvider = routeSegmentProvider;
$.each(parentNodes, function(index, parentNode) {
routeProvider.within(parentNode.Segment);
});
//here is where I would like to check to see where I am at in the tree before I apply this
routeProvider.within(node.Segment).segment(subNode.Segment, {
default: subNode.Default == true,
template: subNode.Template == undefined ? "" : subNode.Template,
templateUrl: subNode.TemplateUrl == undefined ? "" : subNode.TemplateUrl,
controller: node.Controller == undefined ? "" : node.Controller
});
routeProvider.root();