Created
June 1, 2015 22:10
-
-
Save poteto/1751beb683521fd60ab7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
routeHierarchy: computed('currentRouteName', 'reverse', { | |
get() { | |
const currentRouteName = getWithDefault(this, 'currentRouteName', false); | |
assert('[ember-crumbly] Could not find a curent route', currentRouteName); | |
const routeNames = this._splitCurrentRouteName(currentRouteName); | |
const filteredRouteNames = this._filterIndexRoutes(routeNames); | |
const crumbs = this._lookupBreadCrumb(routeNames, filteredRouteNames); | |
return this.get('reverse') ? crumbs.reverse() : crumbs; | |
}, | |
set() { | |
warn('[ember-crumbly] `routeHierarchy` is read only'); | |
} | |
}), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment