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


TypeScript EventEmitter.next方法代码示例

本文整理汇总了TypeScript中@angular/core.EventEmitter.next方法的典型用法代码示例。如果您正苦于以下问题:TypeScript EventEmitter.next方法的具体用法?TypeScript EventEmitter.next怎么用?TypeScript EventEmitter.next使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在@angular/core.EventEmitter的用法示例。


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

示例1: visit

 /**
  * Method to emit context when it is visited.
  *
  * @param context
  *      Object that represents the current context. Community, Collection, or Item.
  */
 visit(context): void {
     if(context.root) {
         this.setRoot(context)
     }
     this.contextProvider.context = context;
     this.emitter.next({action: 'visit', context: context});
 }
开发者ID:DSpace-Labs,项目名称:angular2-ui-prototype,代码行数:13,代码来源:breadcrumb.service.ts

示例2: goSadder

	// I emit a valueChange event to decrease the mood level.
	public goSadder() : void {

		if ( ! this.isSaddest() ) {

			this.valueChange.next( this.value - 1 );

		}

	}
开发者ID:bennadel,项目名称:JavaScript-Demos,代码行数:10,代码来源:my-mood.component.ts

示例3: goHappier

	// ---
	// PUBLIC METHODS.
	// ---


	// I emit a valueChange event to increase the mood level.
	public goHappier() : void {

		if ( ! this.isHappiest() ) {

			this.valueChange.next( this.value + 1 );
	
		}

	}
开发者ID:bennadel,项目名称:JavaScript-Demos,代码行数:15,代码来源:my-mood.component.ts

示例4: _calcTime

  private _calcTime(time: Date) {
    this.runningTime = time;
    this.clockRunning = true;
    document.title = `${this.runningTime.getMinutes()}:${this.runningTime.getSeconds()}`;

    if (this.runningTime.getSeconds() === 0 && this.runningTime.getMinutes() === 0) {
      this.timeCompleted.next(true);
      this.phaseType = null;
      this.clockRunning = false;
      document.title = 'Focus Time Management';
    }
  }
开发者ID:supermarcos,项目名称:focus,代码行数:12,代码来源:focus-timer.component.ts

示例5:

			( event: MouseEvent ) : void => {

				// Try to prevent text from being highlighted by the drag action.
				event.preventDefault();

				// Get the change in mouse location.
				var deltaX = ( event.pageX - this.initialMouseLocation.x );
				var deltaY = ( event.pageY - this.initialMouseLocation.y );

				// Use the mouse delta to calculate the element's position delta.
				this.positionChange.next({
					left: ( this.initialElementPosition.left + deltaX ),
					top: ( this.initialElementPosition.top + deltaY )
				});

			}
开发者ID:CesarChaMal,项目名称:JavaScript-Demos,代码行数:16,代码来源:draggable.directive.ts

示例6: unparsedJson

 set unparsedJson(value: string) {
     if (this._unparsedJson !== value) {
         this._unparsedJson = value;
         let parsedJson : any = null;
         try {
             parsedJson = JSON.parse(this._unparsedJson);
         }
         catch (e) {
             this.parsedJson = null;
             //console.log(e);
         }
         if (parsedJson !== this.parsedJson) {
             this.parsedJson = parsedJson;
             this.parsedJsonChanged.next(this.parsedJson);
         }            
     }
 }
开发者ID:cainem,项目名称:DataViewers,代码行数:17,代码来源:wrappedJson.ts

示例7: value

	set value(newValue: T) {
		let hasValueChanged: boolean = newValue !== this._value;
		this._value = newValue;
		this._onChangedValue.next(hasValueChanged);
	}
开发者ID:domasmas,项目名称:esf,代码行数:5,代码来源:esfStateViewModel.ts

示例8: changeMe

 changeMe() {
     this.num++;
     this.fromParent = 'Changed from child. Count: ' + this.num;
     this.fromParentChange.next(this.fromParent);
 }
开发者ID:AgungPambudi,项目名称:angular2-starter,代码行数:5,代码来源:child.component.ts

示例9:

				( percent: number ) : void => {

					this.scrollPercentageEvent.next( percent );

				}
开发者ID:bennadel,项目名称:JavaScript-Demos,代码行数:5,代码来源:element-scroll-percentage.directive.ts


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