Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /** @ngInject */
- export class MyContainer extends Controller {
- static componentName = 'myContainer';
- static templateUrl = 'app/comp/components/myContainer/myContainer.html';
- static componentOptions: ng.IComponentOptions = {
- transclude: true,
- bindings: {
- headerTitle: '@'
- }
- };
- headerTitle: string;
- isShownBlock: boolean = false;
- constructor(
- ) {
- super();
- }
- }
- <div class="containerHeader" ng-click="ctrl.isShownBlock = !ctrl.isShownBlock">
- <my-icon icon="arrow-filled"></my-icon>
- <div class="containerTitle">{{ctrl.headerTitle}}</div>
- </div>
- <div class="containerContent" ng-if="ctrl.isShownBlock">
- <div class="containerInnerContent" ng-transclude>
- <!--TRANSCLUDED_CONTENT-->
- </div>
- </div>
- <my-container header-title="my container">
- transcluded things
- </my-container>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement