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 -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -