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.4.0/angular.min.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body ng-app="app">
    <test btn-class="'btn-pri'"></test>
</body>
</html>
 
angular.module('app', [])
.directive('test', function() {
    return {
        template: '<p class="{{ btnClass || \'default\' }}">my class is: {{ btnClass || \'default\' }}</p>',
        scope: {
          btnClass: '=' 
        }
    }
})
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers