1
我無法在控制器中使用$ scope.data,它是未定義的,您能幫忙嗎?
感謝
contact.html
<textarea cols="40" rows="6" name="message" id="message" class="panelInputs" placeholder="Message" ng-model="data.message" ng-change="displayscope()"></textarea>
controllers.js
angular.module('BoardLine.controllers', ['BoardLine.services'])
.controller('ContactCtrl', function($scope, $stateParams, sessionService, isPhoneGap, isIOS) {
console.log($scope.data);
$scope.displayscope = function() {
console.log("displayscope : ");
console.log($scope.data);
}
})
app.js
angular.module('BoardLine', ['ionic', 'ngCookies', 'ui.unique', 'BoardLine.controllers', 'BoardLine.services', 'BoardLine.filters'])