Rahul_Dabhi
Rahul_Dabhi

Reputation: 730

How to get all the properties from ember.js controller?

I want to get all the values from the controller that set using set() method.

For example : If

this.controllerFor('application').set("one", "1");
this.controllerFor('application').set("two", "2");
this.controllerFor('application').set("three", "3");
this.controllerFor('application').set("four", "4");

So How I can get all the values directly. I mean dont one by one using get() method.

Upvotes: 2

Views: 693

Answers (1)

Mateusz Nowak
Mateusz Nowak

Reputation: 4121

You can use method getProperties, see an example

this.controllerFor('application').getProperties('one', 'two', 'three', 'four')

Reference: http://emberjs.com/api/classes/Ember.Controller.html#method_getProperties

Upvotes: 1

Related Questions