Skip to content

Instantly share code, notes, and snippets.

@ianjosephwilson
Created January 22, 2013 06:30
Show Gist options
  • Save ianjosephwilson/4592577 to your computer and use it in GitHub Desktop.
Save ianjosephwilson/4592577 to your computer and use it in GitHub Desktop.
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