angular.js - $scope.$watch cannot monitor the input value in the ionic project
给我你的怀抱
给我你的怀抱 2017-05-15 16:52:19
0
2
1233

Input changes under the ion-content tag $scope.$watch cannot be heard

<ion-view>
    <ion-content>
        <input type="text" ng-model='myNumber' />
        {{myNumber}}
    </ion-content>
</ion-view>

This is how it works

<ion-view>
    <input type="text" ng-model='myNumber' />
    {{myNumber}}
</ion-view>

Excuse me, what is the reason for this?

给我你的怀抱
给我你的怀抱

reply all(2)
阿神

Modify it ion-content

<ion-content ng-controller="PlaylistsCtrl">
阿神

script
$scope.payload = {
myNumber: ''
}

<ion-view>

<ion-content>
    <input type="text" ng-model='payload.myNumber' />
    {{payload.myNumber}}
</ion-content>

</ion-view>

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template