You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. I'm trying to get selector value and use it in my component class, but on production annotations[0].selector is empty.
import { Directive, ElementRef, AfterContentInit } from '@angular/core';
@Directive({
selector: '[appLinkedCheckbox]'
})
export class LinkedCheckboxDirective implements AfterContentInit {
private el: HTMLElement;
constructor(el: ElementRef) {
this.el = el.nativeElement;
}
public ngAfterContentInit() {
let annotations = Reflect.getMetadata('annotations', this.constructor);
let selector = annotations[0].selector; // This value is empty on production build
}
}
Hello. I'm trying to get selector value and use it in my component class, but on production annotations[0].selector is empty.
@angular/cli: 1.0.0-rc.0
node: 7.7.4
os: darwin x64
@angular/common: 2.4.10
@angular/compiler: 2.4.10
@angular/core: 2.4.10
@angular/forms: 2.4.10
@angular/http: 2.4.10
@angular/platform-browser: 2.4.10
@angular/platform-browser-dynamic: 2.4.10
@angular/platform-server: 2.4.10
@angular/router: 3.4.10
@angular/compiler-cli: 2.4.10
@angular/cli: 1.0.0-rc.0
The text was updated successfully, but these errors were encountered: