當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。