angular-docs-cn/aio/dist/code-code-example-module-es...

2 lines
2.2 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{DzVX:function(e,t,i){"use strict";i.r(t),i.d(t,"CodeExampleModule",function(){return p});var n=i("ofXK"),o=i("6CTB"),s=i("fXoL");const a=["content"];function c(e,t){if(1&e&&(s.Tb(0,"header"),s.Ac(1),s.Sb()),2&e){const e=s.ec();s.Cb(1),s.Bc(e.header)}}const h=["*"];let d=(()=>{class e{constructor(){this._path="",this.isAvoid=!1}set header(e){this._header=e,this.classes={"headed-code":!!this.header,"simple-code":!this.header}}get header(){return this._header}set path(e){this._path=e,this.isAvoid=-1!==this.path.indexOf(".avoid.")}get path(){return this._path}set hidecopy(e){this._hidecopy=null!=e&&""+e!="false"}get hidecopy(){return this._hidecopy}set hyphenatedHideCopy(e){this.hidecopy=e}set capitalizedHideCopy(e){this.hidecopy=e}ngAfterViewInit(){const e=this.content.nativeElement;this.aioCode.code=e.innerHTML,e.innerHTML=""}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=s.Ib({type:e,selectors:[["code-example"]],viewQuery:function(e,t){if(1&e&&(s.Ec(a,3),s.Ec(o.a,3)),2&e){let e;s.oc(e=s.bc())&&(t.content=e.first),s.oc(e=s.bc())&&(t.aioCode=e.first)}},hostVars:2,hostBindings:function(e,t){2&e&&s.Gb("avoidFile",t.isAvoid)},inputs:{language:"language",linenums:"linenums",region:"region",header:"header",path:"path",hidecopy:"hidecopy",hyphenatedHideCopy:["hide-copy","hyphenatedHideCopy"],capitalizedHideCopy:["hideCopy","capitalizedHideCopy"]},ngContentSelectors:h,decls:5,vars:8,consts:[[2,"display","none"],["content",""],[4,"ngIf"],[3,"ngClass","language","linenums","path","region","hideCopy","header"]],template:function(e,t){1&e&&(s.ic(),s.Tb(0,"div",0,1),s.hc(2),s.Sb(),s.zc(3,c,2,1,"header",2),s.Pb(4,"aio-code",3)),2&e&&(s.Cb(3),s.jc("ngIf",t.header),s.Cb(1),s.jc("ngClass",t.classes)("language",t.language)("linenums",t.linenums)("path",t.path)("region",t.region)("hideCopy",t.hidecopy)("header",t.header))},directives:[n.k,o.a,n.i],encapsulation:2}),e})();var r=i("V90o");let p=(()=>{class e{constructor(){this.customElementComponent=d}}return e.\u0275mod=s.Mb({type:e}),e.\u0275inj=s.Lb({factory:function(t){return new(t||e)},imports:[[n.c,r.a]]}),e})()}}]);
//# sourceMappingURL=code-code-example-module-es2015.af6b398dde18d5f1d877.js.map