File

my-lib/core/core.module.ts

Implements

OnInit

Metadata

selector [domReady]

Index

Properties
Methods

Constructor

constructor(ele: ElementRef)
Parameters :
Name Type Optional Description
ele ElementRef

Methods

ngOnInit
ngOnInit()
Returns : void

Properties

Public ele
ele: ElementRef
Type : ElementRef
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 { }

results matching ""

    No results matching ""