angular.element
home
Run
screen_rotation
fullscreen
cloud_download
<!DOCTYPE html> <html lang="en"> <head> <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.min.js"></script> <script> var myApp = angular.module("myApp", []); myApp.controller("myController", function($scope) { $scope.counter = 0; $scope.angularCount = function() { $scope.counter++; }; }); function jQliteCount(){ var curr = angular.element(count).html(); angular.element(count).html(++curr); } </script> </head> <body> <div ng-app="myApp"> <div ng-controller="myController"> <form novalidate class="simple-form"> <button ng-click ="angularCount()">Angular Counter</button> <button onclick="jQliteCount()">jQLite Counter</button> <p>Angular Counter = {{counter}}</p> <p>jQLite Counter = <span id="count">0</span></p> </form> </div> </div> </body> </html>
<!DOCTYPE html> <html lang="en"> <head> <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.min.js"></script> <script> var myApp = angular.module("myApp", []); myApp.controller("myController", function($scope) { $scope.counter = 0; $scope.angularCount = function() { $scope.counter++; }; }); function jQliteCount(){ var curr = angular.element(count).html(); angular.element(count).html(++curr); } </script> </head> <body> <div ng-app="myApp"> <div ng-controller="myController"> <form novalidate class="simple-form"> <button ng-click ="angularCount()">Angular Counter</button> <button onclick="jQliteCount()">jQLite Counter</button> <p>Angular Counter = {{counter}}</p> <p>jQLite Counter = <span id="count">0</span></p> </form> </div> </div> </body> </html>
Copyrights@tutorialsplane.com