dimanche 28 août 2016

Adding ng-init code from json object

I'm trying to bind value of ng-init to a input from an json object.

However I get "Syntax Error: Token" where am I going wrong ?

$scope.obj = { init: 'obj.value = obj.value || 20' };

Plnkr : http://plnkr.co/edit/nmaxLvbqijXPBKoaQTUQ?p=preview

Aucun commentaire:

Enregistrer un commentaire