Angular js init ng-model from default values

If you can’t rework your app to do what @blesh suggests (pull JSON data down with $http or $resource and populate $scope), you can use ng-init instead:

<input name="cardAngular js init ng-model from default values" ng-model="card.description" ng-init="card.description='Visa-4242'">

See also AngularJS – Value attribute on an input text box is ignored when there is a ng-model used?

Leave a Comment