Hacker News new | ask | show | jobs
by rxcfc 4529 days ago
In the first case, he was using an `ObjectController` without understanding the special behavior of the `model`/`content` property.

In the second case, he used HTML comments to comment out Handlebars code, not realizing that he should have used Handlebars comments.

1 comments

To be fair, the documentation I was linked to doesn't say anything about the 'content' property behaving this way. It only mentions 'model'.

In the second case, it seems quite reasonable to assume it knows about HTML comments and that they would behave as I expect.

The docs for ObjectController (and ObjectProxy, which ObjectController extends) both mention the specific behavior about 'content' (not model, the fact that model and content mean the same thing when you're talking about proxying controllers is something you learn as you go along):

http://emberjs.com/api/classes/Ember.ObjectController.html http://emberjs.com/api/classes/Ember.ObjectProxy.html

Sorry to hear about the pain points so far. I felt like this many times when I was starting with Ember. It definitely gets better the more you become familiar with all the different conventions.