my-lib/core/core.module.ts
selector | [domReady] |
Properties |
|
Methods |
constructor(ele: ElementRef)
|
||||||||
Defined in my-lib/core/core.module.ts:4
|
||||||||
Parameters :
|
ngOnInit |
ngOnInit()
|
Defined in my-lib/core/core.module.ts:10
|
Returns :
void
|
Public ele |
ele:
|
Type : ElementRef
|
Defined in my-lib/core/core.module.ts:6
|
import { Directive, OnInit, ElementRef, NgModule } from '@angular/core';
@Directive({ selector: '[domReady]' })
export class DomReadyDirective implements OnInit {
constructor(
public ele: ElementRef
) {
console.log(new Date().getTime());
}
ngOnInit() {
console.log(this.ele.nativeElement.target);
console.log(new Date().getTime());
}
}
@NgModule({
imports: [],
exports: [
DomReadyDirective
],
declarations: [
DomReadyDirective
],
providers: [],
})
export class AntdCoreModule { }