Couldn't access and modify model data inside Controller

I have tried example program using Ember as in

I need to access and modify some model properties like isSingleLine, isMultiLine, isPickList in controller actions.

It throws exception like #Object doesn’t has set method. I couldn’t figure out the problem what i did

@susai Try setting and getting of values in POJOs using Em.set(context, property, value) and Em.get(context, property).

1 Like

@susai, you can do as @SelvaG has told, or you can use an itemController and handle the action in the itemController.

1 Like

Yes its working. The problem is i am not using Ember object as model. I am using javascript object directly. So Em.set() and Em.get() used to set and get JavaScript objects. Thanks :smile:

I couldn’t understand why i need to create itemController .