ngx-countdown-timer
Advanced tools
Comparing version 0.1.4 to 0.1.5
@@ -1,7 +0,7 @@ | ||
import { OnInit, OnDestroy } from '@angular/core'; | ||
import { OnInit, OnDestroy, ElementRef } from '@angular/core'; | ||
export declare class CountdownTimer implements OnInit, OnDestroy { | ||
private el; | ||
end: any; | ||
displayTime: string; | ||
timer: any; | ||
constructor(); | ||
constructor(el: ElementRef); | ||
ngOnInit(): void; | ||
@@ -8,0 +8,0 @@ ngOnDestroy(): void; |
16
index.js
@@ -1,6 +0,10 @@ | ||
import { Component, Input, NgModule } from '@angular/core'; | ||
import { Component, ElementRef, Input, NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
var CountdownTimer = (function () { | ||
function CountdownTimer() { | ||
/** | ||
* @param {?} el | ||
*/ | ||
function CountdownTimer(el) { | ||
this.el = el; | ||
} | ||
@@ -13,3 +17,3 @@ /** | ||
this.timer = setInterval(function () { | ||
_this.displayTime = _this.getTimeDiff(_this.end); | ||
_this.el.nativeElement.innerHTML = _this.getTimeDiff(_this.end); | ||
}, 1000); | ||
@@ -53,3 +57,3 @@ }; | ||
selector: 'countdown-timer', | ||
template: "<span>{{ displayTime }}</span>" | ||
template: "<ng-content></ng-content>" | ||
},] }, | ||
@@ -60,3 +64,5 @@ ]; | ||
*/ | ||
CountdownTimer.ctorParameters = function () { return []; }; | ||
CountdownTimer.ctorParameters = function () { return [ | ||
{ type: ElementRef, }, | ||
]; }; | ||
CountdownTimer.propDecorators = { | ||
@@ -63,0 +69,0 @@ 'end': [{ type: Input },], |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":3,"metadata":{"CountdownTimerModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"}],"declarations":[{"__symbolic":"reference","name":"CountdownTimer"}],"exports":[{"__symbolic":"reference","name":"CountdownTimer"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":[],"value":{"ngModule":{"__symbolic":"reference","name":"CountdownTimerModule"}}}}},"CountdownTimer":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"countdown-timer","template":"<span>{{ displayTime }}</span>"}]}],"members":{"end":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"getTimeDiff":[{"__symbolic":"method"}],"twoDigit":[{"__symbolic":"method"}]}}},"origins":{"CountdownTimerModule":"./index","CountdownTimer":"./countdown-timer.component"},"importAs":"ngx-countdown-timer"} | ||
{"__symbolic":"module","version":3,"metadata":{"CountdownTimerModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"}],"declarations":[{"__symbolic":"reference","name":"CountdownTimer"}],"exports":[{"__symbolic":"reference","name":"CountdownTimer"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":[],"value":{"ngModule":{"__symbolic":"reference","name":"CountdownTimerModule"}}}}},"CountdownTimer":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"countdown-timer","template":"<ng-content></ng-content>"}]}],"members":{"end":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"getTimeDiff":[{"__symbolic":"method"}],"twoDigit":[{"__symbolic":"method"}]}}},"origins":{"CountdownTimerModule":"./index","CountdownTimer":"./countdown-timer.component"},"importAs":"ngx-countdown-timer"} |
@@ -8,3 +8,7 @@ (function (global, factory) { | ||
var CountdownTimer = (function () { | ||
function CountdownTimer() { | ||
/** | ||
* @param {?} el | ||
*/ | ||
function CountdownTimer(el) { | ||
this.el = el; | ||
} | ||
@@ -17,3 +21,3 @@ /** | ||
this.timer = setInterval(function () { | ||
_this.displayTime = _this.getTimeDiff(_this.end); | ||
_this.el.nativeElement.innerHTML = _this.getTimeDiff(_this.end); | ||
}, 1000); | ||
@@ -57,3 +61,3 @@ }; | ||
selector: 'countdown-timer', | ||
template: "<span>{{ displayTime }}</span>" | ||
template: "<ng-content></ng-content>" | ||
},] }, | ||
@@ -64,3 +68,5 @@ ]; | ||
*/ | ||
CountdownTimer.ctorParameters = function () { return []; }; | ||
CountdownTimer.ctorParameters = function () { return [ | ||
{ type: core.ElementRef, }, | ||
]; }; | ||
CountdownTimer.propDecorators = { | ||
@@ -67,0 +73,0 @@ 'end': [{ type: core.Input },], |
{ | ||
"name": "ngx-countdown-timer", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
10017
220