javascript - ngModel not working -


$scope.callfunction = function() {    console.log($scope.modeldata);  }
<md-select ng-model="modeldata" ng-change="callfunction()">    <md-option ng-repeat="x in tempdata" ng-value="x">{{x}}    </md-option>  </md-select>

i'm trying use md-select select boxes ng-model doesn't seem work. idea i'm going wrong?

the output in ng-change function comes undefined.

the models accessible via $scope in controller $scope.modelname

// sometime data might not bind object in case declare not   $scope.modelname;  $scope.callfunction = function() {    console.log($scope.modelname);  }
<md-select ng-model="modelname" ng-change="callfunction()">    <md-option ng-repeat="x in tempdata" ng-value="x">{{x}}    </md-option>  </md-select>


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -