Last active
April 20, 2018 18:23
-
-
Save jerkovicl/d38a96ea02ac724454d23a58c97a7aa9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
Component, | |
Directive, | |
Renderer2, | |
ElementRef, | |
NgModule, | |
Input, | |
Output, | |
EventEmitter, | |
AfterContentInit, | |
OnInit | |
} from '@angular/core'; | |
import { MatFormFieldControl } from '@angular/material'; | |
import { AboutComponent } from '@app/about/about.component'; | |
import { NgControl } from '@angular/forms'; | |
@Directive({ | |
selector: "[inputDisable]", | |
providers: [] | |
}) | |
export class InputDisableDirective implements AfterContentInit, OnInit { | |
@Input() inputDisable: string[] | |
constructor(private el: ElementRef, | |
private renderer: Renderer2, private ngControl : NgControl) { | |
//noinspection TypeScriptUnresolvedVariable,TypeScriptUnresolvedFunction | |
} | |
ngOnInit() { | |
this.ngControl.control.disable(); | |
} | |
ngAfterContentInit() { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment