Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2017
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. /** @ngInject */
  2. export class MyContainer extends Controller {
  3. static componentName = 'myContainer';
  4. static templateUrl = 'app/comp/components/myContainer/myContainer.html';
  5.  
  6. static componentOptions: ng.IComponentOptions = {
  7. transclude: true,
  8. bindings: {
  9. headerTitle: '@'
  10. }
  11. };
  12.  
  13. headerTitle: string;
  14. isShownBlock: boolean = false;
  15.  
  16. constructor(
  17.  
  18. ) {
  19. super();
  20. }
  21. }
  22.  
  23. <div class="containerHeader" ng-click="ctrl.isShownBlock = !ctrl.isShownBlock">
  24. <my-icon icon="arrow-filled"></my-icon>
  25. <div class="containerTitle">{{ctrl.headerTitle}}</div>
  26. </div>
  27. <div class="containerContent" ng-if="ctrl.isShownBlock">
  28. <div class="containerInnerContent" ng-transclude>
  29. <!--TRANSCLUDED_CONTENT-->
  30. </div>
  31. </div>
  32.  
  33. <my-container header-title="my container">
  34. transcluded things
  35. </my-container>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement