UNPKG

mobileoa-common-modules

Version:

移动办公平台前端公共功能模块

36 lines (28 loc) 656 B
'use strict'; var angular = require('angular'); require('../modules'); angular .module('infoDisplay.directives') .directive('sinoTab', sinoTab); /** @ngInject */ function sinoTab() { return { restrict: 'E', transclude: true, template: '<div class="sino-tab" ng-transclude ng-if="cache"></div><p ng-if="!cache"></p>', require: '^sinoTabs', scope: true, link: link } function link(scope, element, attrs, ctrl) { scope.cache = false; init(); function init() { ctrl.addTab(new Tab(scope, attrs.name)); }; } } function Tab(scope, name) { this.scope = scope; this.name = name; }