lundi 27 mars 2017

How to check if ember model has key

I'm using ember data since long time but I never had a situation to check if there's a key present in the model. Generally, I check if there's a value present for a key in the model as

if(model.get('keyname')) { console.log('value present') }

But now I want to check if there's a key present in the model object. Any help would be appreciated.




Aucun commentaire:

Enregistrer un commentaire