当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript core.Input函数代码示例

本文整理汇总了TypeScript中angular2/core.Input函数的典型用法代码示例。如果您正苦于以下问题:TypeScript Input函数的具体用法?TypeScript Input怎么用?TypeScript Input使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了Input函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: dominator

 @Input() set dominator(count: Number) {
   this._viewContainer.clear();
   
   for (let i = 0; i < count; i++) {
     this._viewContainer.createEmbeddedView(this._templateRef);
   }
 }
开发者ID:Bernardao,项目名称:fem-ng2-examples,代码行数:7,代码来源:dominator.directive.ts

示例2: porId

 @Input('porId')
 set porId(newPorId: number) {
   this.myPorId = newPorId;
   if (newPorId != null) {
     this.reloadSections();
   }
 }
开发者ID:feloy,项目名称:var,代码行数:7,代码来源:portal-entity.ts

示例3: myUnless

 @Input() set myUnless(condition: boolean) {
   if (!condition) {
     this._viewContainer.createEmbeddedView(this._templateRef);
   } else {
     this._viewContainer.clear();
   }
 }
开发者ID:arankun,项目名称:ang2,代码行数:7,代码来源:unless.directive.ts

示例4: stepCount

 //Setter for stepCount fills array of steps; needed for ngFor loop in template
 @Input('step-count') public set stepCount(value:number) {
     this._stepCount = value;
     var steps = [];
     for (var i = 0; i < this._stepCount; i++)
         steps.push(i);
     this.steps = steps;
 }
开发者ID:bertwillekens,项目名称:ip2teama,代码行数:8,代码来源:board.component.ts

示例5: stockSymbol

 @Input("stock-symbol")
 set stockSymbol(value: string) {
     this._stockSymbol = value;
     if (this._stockSymbol !== undefined) {
         console.log(`Sending a Buy order to NASDAQ: ${this.stockSymbol}   ${this.quantity}`);
     }
 }
开发者ID:yuvagit,项目名称:Angular2,代码行数:7,代码来源:inputbinding.ts

示例6: model

	@Input() set model(value: any) {
		this._model = value;

		// If a template has already been rendered, set as implicit local
		if (this._view != null) {
			this.setLocal();
		}
	}
开发者ID:SamGraber,项目名称:conf-template-components,代码行数:8,代码来源:render-template.ts

示例7: steamId

  @Input()
  set steamId(value: string) {
    this._steamId = value;
    this.games = [];

    if (value) {
      this.getGames(value);
    }
  }
开发者ID:julioolvr,项目名称:angular2-steam-games,代码行数:9,代码来源:games-list.ts

示例8: ngTemplateOutlet

  @Input()
  set ngTemplateOutlet(templateRef: TemplateRef<Object>) {
    if (isPresent(this._insertedViewRef)) {
      this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._insertedViewRef));
    }

    if (isPresent(templateRef)) {
      this._insertedViewRef = this._viewContainerRef.createEmbeddedView(templateRef);
    }
  }
开发者ID:844496869,项目名称:angular,代码行数:10,代码来源:ng_template_outlet.ts

示例9: collapse

 @Input()
 private set collapse(value:boolean) { 
   if(value!==undefined){
     if(value){ 
       this.hide(); 
     }else { 
       this.show();
     }
   }
 }
开发者ID:cainem,项目名称:Viewers,代码行数:10,代码来源:collapsibleDiv.component.ts

示例10: imageData

    @Input()
    set imageData(imageData: ImageData) {

        if(imageData) {
            this.canvas = this.imageCanvas.nativeElement;
            this.canvasContext = this.canvas.getContext('2d');

            this.canvas.width = imageData.width;
            this.canvas.height = imageData.height;
            this.canvasContext.putImageData(imageData, 0, 0);
        }
        
    }
开发者ID:luismiguelprs,项目名称:feevale.pdi_playground,代码行数:13,代码来源:component.ts


注:本文中的angular2/core.Input函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。