Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @{
- Layout = null;
- }
- @Scripts.Render("~/bundles/angular")
- <div ng-app="scopeExample">
- <div ng-controller="MyController">
- Your name:
- <input type="text" ng-model="username">
- <button ng-click='sayHello()'>greet</button>
- <hr>
- {{greeting}}
- <h4>{{username}}</h4>
- </div>
- </div>
- <script>
- alert("sasa")
- angular.module('scopeExample', [])
- .controller('MyController', function ($scope) {
- $scope.username = 'World';
- $scope.sayHello = function () {
- $scope.greeting = 'Hello ' + $scope.username + '!';
- };
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment