-
-
Notifications
You must be signed in to change notification settings - Fork 333
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(tests/dummy/app): removes `application-controller.router-properti…
…es` deprecations.
- Loading branch information
1 parent
5b8cf57
commit 5aa21b0
Showing
3 changed files
with
43 additions
and
40 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,30 @@ | ||
/* eslint-disable ember/no-actions-hash, prettier/prettier */ | ||
/* eslint-disable ember/no-actions-hash */ | ||
import { equal } from '@ember/object/computed'; | ||
import Controller from '@ember/controller'; | ||
import { computed } from '@ember/object'; | ||
import { inject as service } from '@ember/service'; | ||
|
||
export default Controller.extend({ | ||
router: service(), | ||
|
||
actions: { | ||
toggleExpandedItem(value, ev) { | ||
if (this.expandedItem === value) { | ||
value = null; | ||
} | ||
this.set('expandedItem', value); | ||
ev.stopPropagation(); | ||
} | ||
}, | ||
}, | ||
|
||
expandedItem: computed('currentRouteName', function() { | ||
if (this.currentRouteName.substr(0, 6) === 'layout') { | ||
expandedItem: computed('router.currentRouteName', function () { | ||
if (this.router.currentRouteName.substr(0, 6) === 'layout') { | ||
return 'layout'; | ||
} else { | ||
return 'demos'; | ||
} | ||
}), | ||
|
||
demosExpanded: equal('expandedItem', 'demos'), | ||
layoutExpanded: equal('expandedItem', 'layout') | ||
layoutExpanded: equal('expandedItem', 'layout'), | ||
}); |
This file contains 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
This file contains 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