You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the #if helper with capitalized properties, the binding it sets up assumes the path is global, resulting in a broken binding.
E.g.:
{{#if view.SubView}}
...
{{/if}}
See the JSFiddle http://jsfiddle.net/NnKAN/. When "Destroy view" is clicked, it will break when it tries to unwatch the non-existing global path.
A workaround is obviously to not use capitalized properties, but it is a convention that comes very naturally for locally defined classes since class names are conventionally capitalized. Analogous to the Java/C#-style idiom:
class SomeClass {
private class MyClass { }
}
And while {{#if MyView}} seems like it should be interpreted as a global path (according to Ember conventions), it is not very intuitive that {{#if view.MyView}} is interpreted as global, ignoring the "view." part of the path entirely.
I've also used this convention for some time now, without issue until this.
The text was updated successfully, but these errors were encountered:
When using the #if helper with capitalized properties, the binding it sets up assumes the path is global, resulting in a broken binding.
E.g.:
See the JSFiddle http://jsfiddle.net/NnKAN/. When "Destroy view" is clicked, it will break when it tries to unwatch the non-existing global path.
A workaround is obviously to not use capitalized properties, but it is a convention that comes very naturally for locally defined classes since class names are conventionally capitalized. Analogous to the Java/C#-style idiom:
And while {{#if MyView}} seems like it should be interpreted as a global path (according to Ember conventions), it is not very intuitive that {{#if view.MyView}} is interpreted as global, ignoring the "view." part of the path entirely.
I've also used this convention for some time now, without issue until this.
The text was updated successfully, but these errors were encountered: