Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.1.5/angular.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<div ng-app='App'>
    <div ng-controller='Controller'>
        <button ng-click='toggle()'>highlight</button>{{car}}
      <div class="click_{{car}}">Cadillac 凱迪拉克</div>
    </div>
</div>  
</body>
</html>
 
.click_true{
    background-color:yellow;
}
 
var App = angular.module('App', []);
App.controller('Controller', function($scope){
    $scope.car = false;
    $scope.toggle = function(){
      $scope.car = !$scope.car;  
    };
});
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
annaismepro
0viewers