Having to reference the model when using a Needs controller

35 views Asked by At

Don't know what's going on suddenly, but where I have a needs: ['project'], I now have to do controllers.project.model.property instead of controllers.project.property as worked before, which is also how the guides show it. Anybody have a clue as to why I'm having to put model in there now?

1

There are 1 answers

6
redOctober13 On

I think I figured it out. In 1.11, proxying is deprecated, and usually you get a deprecation warning. However, I had made an empty project controller (extended from Ember.Controller), and doing that somehow suppressed the deprecations, so I wasn't seeing any, but couldn't figure out why my controller wasn't working. So when I removed that empty controller file, then the deprecation warnings popped up saying I should use 'model.property' instead of just 'property.'