-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Description
tldr - fiddle me this: http://jsfiddle.net/rlivsey/bjfDk/
The app has a contextual navigation bar for the current project in the application template:
+------------------------------------------------+
| {{#if currentProject}} project nav {{/if}} |
|------------------------------------------------|
|+----------------------------------------------+|
|| ||
|| ||
|| {{outlet}} ||
|| ||
|| ||
|+----------------------------------------------+|
+------------------------------------------------+
This gets the currentProject from the projectController via needs:
App.ApplicationController = Ember.Controller.extend({
needs: "project",
currentProjectBinding: "controllers.project"
});
However is seems that currentProject is always truthy and so the project navigation always appears (I assume because the controller exists, even though it has no content). Binding instead to controllers.project.content toggles as expected, but I don't think we should have to do that?
{{linkTo}}'s in the navigation bar in the application template using currentProject break in a number of ways:
- the href doesn't update when
currentProjectchanges, but the contents of the link do - clicking the links raises "Uncaught RangeError: Maximum call stack size exceeded"
The fiddle shows these issues in action: http://jsfiddle.net/rlivsey/bjfDk/