Created
April 15, 2015 15:15
-
-
Save juanmav/4f8d79e884fab5343586 to your computer and use it in GitHub Desktop.
Decorate a Directive
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
| var app = angular.module('suriWebClientApp'); | |
| // http://angular-tips.com/blog/2013/09/experiment-decorating-directives/ | |
| app.config(function($provide){ | |
| $provide.decorator('mdTabsDirective', function($delegate) { | |
| var directive = $delegate[0]; | |
| directive.template = '<section ng-hide="true" class="md-header" ng-class="{\'md-paginating\': pagination.active}"><button class="md-paginator md-prev" ng-if="pagination.active && pagination.hasPrev" ng-click="pagination.clickPrevious()" aria-hidden="true"><md-icon md-svg-icon="tabs-arrow"></md-icon></button><div class="md-header-items-container" md-tabs-pagination><div class="md-header-items"><md-tabs-ink-bar></md-tabs-ink-bar></div></div><button class="md-paginator md-next" ng-if="pagination.active && pagination.hasNext" ng-click="pagination.clickNext()" aria-hidden="true"><md-icon md-svg-icon="tabs-arrow"></md-icon></button></section><section class="md-tabs-content"></section>' | |
| return $delegate; | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment