diff options
author | Tao Shen <shentao@chinamobile.com> | 2020-02-24 08:04:08 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-02-24 08:04:08 +0000 |
commit | 2f3a4ddaee7bf578f83fa9af7bd18e54c84b54d3 (patch) | |
tree | 5d7f424c9c52530e573622471714e4b792f9de20 /usecaseui-portal/src/app/core | |
parent | 3bb632ae93f5dbe1ef43a9c08e380c142a69e1ce (diff) | |
parent | 1c0e11d0e8221eedbc86577501d5fd40d4890d7e (diff) |
Merge "USECASEUI-388 fixed and with additional changes Fixed i18Resource, subtittle wrap and directive folder Path. Alos added few changes for adapting multiple templates."
Diffstat (limited to 'usecaseui-portal/src/app/core')
-rw-r--r-- | usecaseui-portal/src/app/core/Directives/disable-control.directive.ts | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/usecaseui-portal/src/app/core/Directives/disable-control.directive.ts b/usecaseui-portal/src/app/core/Directives/disable-control.directive.ts new file mode 100644 index 00000000..85495401 --- /dev/null +++ b/usecaseui-portal/src/app/core/Directives/disable-control.directive.ts @@ -0,0 +1,17 @@ +import { Directive, Input } from '@angular/core'; +import { NgControl } from '@angular/forms'; + +@Directive({ + selector: '[disableControl]' +}) +export class DisableControlDirective { + + @Input() + set disableControl(condition: boolean) { + const action = condition ? 'enable' : 'disable'; + this.ngControl.control[action](); + } + + constructor(private ngControl: NgControl) { + } +}
\ No newline at end of file |