Skip to content

Instantly share code, notes, and snippets.

@lucassus
Created January 22, 2014 10:22
Show Gist options
  • Save lucassus/8556481 to your computer and use it in GitHub Desktop.
Save lucassus/8556481 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery.min.js"></script>
<link href="http://getbootstrap.com/dist/css/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<script src="http://getbootstrap.com/dist/js/bootstrap.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.3/angular.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body ng-app="myApp">
<panel>
<a href="" class="btn btn-default">Click me!</a>
</panel>
</body>
</html>
var myApp = angular.module("myApp", []);
myApp.directive("panel", function() {
return {
restrict: "E",
replace: true,
transclude: true,
template: '<div class="panel" ng-transclude>This is a panel</div>'
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment