Created
January 22, 2013 06:30
-
-
Save ianjosephwilson/4592577 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GridsApp.directive('gridTag', function() { | |
return { | |
template: '<div ng_class="{{grid.getCssClasses()}}"' + | |
' ng_switch="grid.type">' + | |
' <div ng_switch_when="{{GRID_TYPES.container}}">' + | |
' <div data-grid-tag="" ng_model="nestedGrid" ' + | |
' ng_repeat="nestedGrid in grid.children"></div>' + | |
' </div>' + | |
' <div ng_switch_when="{{GRID_TYPES.text}}">TEXT</div>' + | |
' <div ng_switch_when="{{GRID_TYPES.image}}">IMAGE</div>' + | |
' </div>', | |
replace: true, | |
transclude: true, | |
restrict: 'A', | |
scope: { | |
grid: '=ngModel' | |
}, | |
link: function (elm, scope, attrs) {} | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment