Skip to content

Instantly share code, notes, and snippets.

@limichange
Created March 1, 2014 04:54
Show Gist options
  • Save limichange/9285416 to your computer and use it in GitHub Desktop.
Save limichange/9285416 to your computer and use it in GitHub Desktop.
change css
<!doctype html>
<html lang="en" ng-app>
<head>
<meta charset="UTF-8">
<title>test</title>
<style>
.menu-disabled-true {
color: gray;
}
</style>
</head>
<body>
<div ng-controller="DeathrayMenuController">
<ul>
<li class="menu-disabled-{{isDisabled}}" ng-click="stun()">Stun</li>
</ul>
</div>
<script type="text/javascript" src="angular.min.js"></script>
<script type="text/javascript" src="main.js"></script>
</body>
</html>
function DeathrayMenuController($scope) {
$scope.isDisabled = false;
$scope.stun = function() {
$scope.isDisabled = true;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment