var app = angular.module('app', []);
app.controller('MainCtrl', function($scope) {
$scope.name = 'World';
})
/*.directive('buttonDirective',function() {
return {
restrict: 'AE',
transclude:true,
template:'<button class="btn btn-primary" type="button">' +
'Where is the mouse</button><data-ng-transclude></data-ng-transclude>'
}
})*/
<!DOCTYPE html>
<html data-ng-app="app">
<head>
<meta charset="utf-8" />
<title>AngularJS Transclude example</title>
<link href="style.css" rel="stylesheet" />
<script src="https://code.angularjs.org/1.0.8/angular.js"></script>
<script src="app.js"></script>
</head>
<body data-ng-controller="MainCtrl">
<button-directive>
<span class="badge">©Let's find it</span>
</button-directive>
<p>Hello {{name}}!</p>
</body>
</html>
/* Put your css in here */