Skip to content

Instantly share code, notes, and snippets.

@Tk-archer
Last active August 29, 2015 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tk-archer/5cec769e6619ae1bff38 to your computer and use it in GitHub Desktop.
Save Tk-archer/5cec769e6619ae1bff38 to your computer and use it in GitHub Desktop.
....
$stateProvider.state('app.reply', {
url: '/reply',
views: {
'menuContent': {
templateUrl: 'reply.html',
controller: 'replyCtrl'
}
}
});
...
....
Ctrls.controller('replyCtrl',
['$scope',function ($scope) {
$scope.send = function (data) {
console.log(data, $scope.textarea);
};
}]);
....
<!--reply.html-->
<ion-view view-title="reply">
<ion-content>
<ion-list>
<form>
<div class="item item-input">
<textarea ng-model="textarea" name="content" rows="3" placeholder="正文"></textarea>
</div>
</form>
</ion-list>
<div class="padding">
<button ng-click="send(textarea)" class="button button-block button-positive">发送</button>
</div>
</ion-content>
</ion-view>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment