Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- var app = angular.module('MyApp', []);
- app.controller('Ctrl', function ($scope) {
- console.log('Controller is executed');
- $scope.btnClick = function () {
- console.log($scope.desc);
- }
- $scope.ShowData = function () {
- $scope.text = $scope.desc;
- }
- });
- </script>
- <body ng-controller="Ctrl">
- <form>
- <textarea ng-model="desc" cols="105" rows="15"></textarea>
- <button ng-click="btnClick()">Submit</button>
- <button ng-click="ShowData()">Show</button>
- </form>
- <div ng-bind="text"></div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement