-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path1212.acedc29f8e21e78a.js
1 lines (1 loc) · 2.31 KB
/
1212.acedc29f8e21e78a.js
1
"use strict";(self.webpackChunkmaterial_angular_io=self.webpackChunkmaterial_angular_io||[]).push([[1212],{1212:(f,s,i)=>{i.r(s),i.d(s,{CdkPortalOverviewExample:()=>P,ComponentPortalExample:()=>p});var t=i(4438),r=i(6939);const m=["templatePortalContent"],d=["domPortalContent"];function u(e,v){}function _(e,v){1&e&&t.EFF(0,"Hello, this is a template portal")}let P=(()=>{class e{constructor(a){this._viewContainerRef=a}ngAfterViewInit(){this.componentPortal=new r.A8(p),this.templatePortal=new r.VA(this.templatePortalContent,this._viewContainerRef),this.domPortal=new r.pc(this.domPortalContent)}static#t=this.\u0275fac=function(l){return new(l||e)(t.rXU(t.c1b))};static#e=this.\u0275cmp=t.VBU({type:e,selectors:[["cdk-portal-overview-example"]],viewQuery:function(l,o){if(1&l&&(t.GBs(m,5),t.GBs(d,5)),2&l){let n;t.mGM(n=t.lsd())&&(o.templatePortalContent=n.first),t.mGM(n=t.lsd())&&(o.domPortalContent=n.first)}},standalone:!0,features:[t.aNF],decls:15,vars:1,consts:[["templatePortalContent",""],["domPortalContent",""],[1,"example-portal-outlet"],[3,"cdkPortalOutlet"],[3,"click"]],template:function(l,o){if(1&l){const n=t.RV6();t.j41(0,"h2"),t.EFF(1,"The portal outlet is below:"),t.k0s(),t.j41(2,"div",2),t.DNE(3,u,0,0,"ng-template",3),t.k0s(),t.DNE(4,_,1,0,"ng-template",null,0,t.C5r),t.j41(6,"button",4),t.bIt("click",function(){return t.eBV(n),t.Njj(o.selectedPortal=o.componentPortal)}),t.EFF(7,"Render component portal"),t.k0s(),t.j41(8,"button",4),t.bIt("click",function(){return t.eBV(n),t.Njj(o.selectedPortal=o.templatePortal)}),t.EFF(9,"Render template portal"),t.k0s(),t.j41(10,"button",4),t.bIt("click",function(){return t.eBV(n),t.Njj(o.selectedPortal=o.domPortal)}),t.EFF(11,"Render DOM portal"),t.k0s(),t.j41(12,"div",null,1),t.EFF(14,"Hello, this is a DOM portal"),t.k0s()}2&l&&(t.R7$(3),t.Y8G("cdkPortalOutlet",o.selectedPortal))},dependencies:[r.jc,r.I3],styles:[".example-portal-outlet[_ngcontent-%COMP%] {\n margin-bottom: 10px;\n padding: 10px;\n border: 1px dashed black;\n width: 250px;\n height: 250px;\n}"]})}return e})(),p=(()=>{class e{static#t=this.\u0275fac=function(l){return new(l||e)};static#e=this.\u0275cmp=t.VBU({type:e,selectors:[["component-portal-example"]],standalone:!0,features:[t.aNF],decls:1,vars:0,template:function(l,o){1&l&&t.EFF(0,"Hello, this is a component portal")},encapsulation:2})}return e})()}}]);