Skip to content

Instantly share code, notes, and snippets.



Created Apr 15, 2013
What would you like to do?
AngularJS Transclude Simple Sample
Simple transclude sample dom
<div ng-app="phoneApp">
<div ng-controller="AppCtrl">
<div class="button">Click me!</div>
var app = angular.module("phoneApp", []);
app.controller("AppCtrl", function($scope) {
app.directive("panel", function() {
return {
restrict: "E",
transclude: true,
template: '<div class="panel" ng-transclude>This is a panel component</div>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment