Skip to content

Instantly share code, notes, and snippets.

@lucassus
Created January 22, 2014 10:22

Revisions

  1. lucassus created this gist Jan 22, 2014.
    21 changes: 21 additions & 0 deletions jsbin.eKohaGAh.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    <!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>
    10 changes: 10 additions & 0 deletions jsbin.eKohaGAh.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    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>'
    };
    });