• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

TypeScript core.Input函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
TypeScript core.assertPlatform函数代码示例发布时间:2022-05-25
下一篇:
TypeScript core.HostListener函数代码示例发布时间:2022-05-25
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap