jeudi 14 avril 2016

Angular checkbox only updates model after second click

Using Angular please look at the following Plunkr:

When you click the checkbox the first time the model doesn't update? Anyone know why this happens?

http://ift.tt/1S97c5j

var app = angular.module('main', ['ngMaterial'])
    .controller('DemoCtrl', function($scope, $filter, $http) {
      $scope.propdata = [];
      $scope.success ="loading..";
      var url = "api.json";
       $http({url:url,
         method:"GET"
       }).then(function (rs){
         $scope.propdata = rs.data[0];
         $scope.success ="done..";
       });
    });

Thanks Regards Johan




Aucun commentaire:

Enregistrer un commentaire