Use ng-metadata as a Backport of Angular 2+ API (#2486)
* starting UtilService refactor * pre find-replace angular.module('quay') => angular.module('QuayModule') * successfully switched to ng-metadata for backported Angular2 API * working with parent component reference in child * fixing @Output to use EventEmitter * fixed @Output events for custom git trigger * more fixes * refactored QuayPages module for backwards-compatibility * reinitialized test.db * use minified libraries * replaced references for angular-ts-decorators * fixed ng-show
This commit is contained in:
parent
6352b3cac5
commit
7a352ddfbc
43 changed files with 642 additions and 551 deletions
|
@ -1,6 +1,5 @@
|
|||
import { ViewArray } from './view-array';
|
||||
import { Inject } from '../../decorators/inject/inject.decorator';
|
||||
import { Injectable } from 'angular-ts-decorators';
|
||||
import { Injectable, Inject } from 'ng-metadata/core';
|
||||
|
||||
|
||||
@Injectable(ViewArray.name)
|
||||
|
@ -15,7 +14,7 @@ export class ViewArrayImpl implements ViewArray {
|
|||
private currentIndex: number;
|
||||
private additionalCount: number = 20;
|
||||
|
||||
constructor(@Inject('$interval') private interval: any) {
|
||||
constructor(@Inject('$interval') private $interval: ng.IIntervalService) {
|
||||
this.isVisible = false;
|
||||
this.visibleEntries = null;
|
||||
this.hasEntries = false;
|
||||
|
@ -62,7 +61,7 @@ export class ViewArrayImpl implements ViewArray {
|
|||
}
|
||||
|
||||
public create(): ViewArrayImpl {
|
||||
return new ViewArrayImpl(this.interval);
|
||||
return new ViewArrayImpl(this.$interval);
|
||||
}
|
||||
|
||||
private showAdditionalEntries(): void {
|
||||
|
@ -83,14 +82,14 @@ export class ViewArrayImpl implements ViewArray {
|
|||
return;
|
||||
}
|
||||
|
||||
this.timerRef = this.interval(() => {
|
||||
this.timerRef = this.$interval(() => {
|
||||
this.showAdditionalEntries();
|
||||
}, 10);
|
||||
}
|
||||
|
||||
private stopTimer(): void {
|
||||
if (this.timerRef) {
|
||||
this.interval.cancel(this.timerRef);
|
||||
this.$interval.cancel(this.timerRef);
|
||||
this.timerRef = null;
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue