Created
July 1, 2017 16:15
-
-
Save ramin-ahmadi/5ae3440118664b8a6824974b6d8231d0 to your computer and use it in GitHub Desktop.
// source https://jsbin.com/demige
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html ng-app="myApp"> | |
<head> | |
<link rel="stylesheet" href="http://cdn.jsdelivr.net/foundation/4.3.2/css/foundation.min.css"> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0-rc.2/angular.js"></script> | |
</head> | |
<body> | |
<div ng-controller="CounterController"> | |
<button ng-click="increment()"> | |
Increment | |
</button> | |
<button ng-click="decrement()"> | |
Decrement | |
</button> | |
count: {{count}} | |
<div> | |
<script id="jsbin-javascript"> | |
angular.module('myApp',[]) | |
.controller('CounterController',function($scope){ | |
$scope.count=0; | |
$scope.decrement=function(){ | |
$scope.count--; | |
} | |
$scope.increment=function(){ | |
$scope.count++; | |
} | |
}) | |
</script> | |
<script id="jsbin-source-html" type="text/html"><!doctype html> | |
<html ng-app="myApp"> | |
<head> | |
<link rel="stylesheet" href="//cdn.jsdelivr.net/foundation/4.3.2/css/foundation.min.css"> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0-rc.2/angular.js"><\/script> | |
</head> | |
<body> | |
<div ng-controller="CounterController"> | |
<button ng-click="increment()"> | |
Increment | |
</button> | |
<button ng-click="decrement()"> | |
Decrement | |
</button> | |
count: {{count}} | |
<div> | |
</body> | |
</html></script> | |
<script id="jsbin-source-javascript" type="text/javascript">angular.module('myApp',[]) | |
.controller('CounterController',function($scope){ | |
$scope.count=0; | |
$scope.decrement=function(){ | |
$scope.count--; | |
} | |
$scope.increment=function(){ | |
$scope.count++; | |
} | |
})</script></body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('myApp',[]) | |
.controller('CounterController',function($scope){ | |
$scope.count=0; | |
$scope.decrement=function(){ | |
$scope.count--; | |
} | |
$scope.increment=function(){ | |
$scope.count++; | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment