ptmoy2
ptmoy2

Reputation: 413

Accessing Controller Variables in View

Please see: http://jsfiddle.net/ptmoy2/9RRfJ/

I'm using Ember 1.4 in my app. I can display the controller variables in the view's template, but I can't access the same variable from the view. It comes out as 'undefined' when tried outputing to console.

 console.log(this.get('dummy'));

I haven't defined a backing model because I don't really need anything persisted in this particular route.

How do I access controller variables from an associated view?

Upvotes: 0

Views: 465

Answers (1)

dimusic
dimusic

Reputation: 4133

Use this.get('controller.dummy')

Upvotes: 1

Related Questions