Skip to content

Commit 9c18b5b

Browse files
committed
Merge branch 'ui-states' of github.com:angular-ui/router into ui-states
2 parents 3957e78 + 5d73322 commit 9c18b5b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/stateProvider.js

+2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
3030
// Derive parent state from a hierarchical name only if 'parent' is not explicitly defined.
3131
var parent = root;
3232
if (!isDefined(state.parent)) {
33+
// regex matches any valid composite state name
34+
// would match "contact.list" but not "contacts"
3335
var compositeName = /^(.+)\.[^.]+$/.exec(name);
3436
if (compositeName != null) {
3537
parent = findState(compositeName[1]);

0 commit comments

Comments
 (0)