name: [{value: '', disabled: true}, Validators.required],
name: [{value: '', disabled: this.isDisabled}, Validators.required],
or
this.form.controls['name'].disable();
More Related Contents:
- How to create cross-domain request?
- Angular2 validator which relies on multiple form fields
- Property ‘map’ does not exist on type ‘Observable’
- Inject a service manually
- How to send “Cookie” in request header for all the requests in Angular2?
- How to disable a input in angular2
- Can’t bind to ‘ngIf’ since it isn’t a known property of ‘div’ [duplicate]
- Can an ng-content be used inside of an ngFor?
- document.getElementById replacement in angular4 / typescript?
- Angular file upload progress percentage [duplicate]
- Angular2 add class to body tag
- How can I avoid adding prefix “unsafe” to a link by Angular 2? [duplicate]
- Page is part of the declarations of 2 modules: Error in ionic build prod
- angular 2 change detection and ChangeDetectionStrategy.OnPush
- Uncaught Error: Unexpected directive ‘MyComboBox’ imported by the module ‘AppModule’. Please add a @NgModule annotation
- Angular 2 passing object via route params possible?
- access SASS values ($colors from variables.scss) in Typescript (Angular2 ionic2)
- Angular2 routing / deep linking not working with Apache 404
- Detect when IMG element has loaded in Angular 2+
- Include assets when building angular library
- What is the difference between formControlName and FormControl?
- How to make nested Observable calls in Angular2
- How to call scrollIntoView on an element in angular 2+
- How do I get experimental ngTemplateOutlet to work?
- Page transition animations with Angular 2.0 router and component interface promises
- Inject Http manually in Angular 2
- Error from chokidar (C:\): Error: EBUSY: resource busy or locked, lstat ‘C:\DumpStack.log.tmp
- Angular 6 Uncaught ReferenceError: Buffer is not defined
- Angular 6 Migration -.angular-cli.json to angular.json
- Filtering specific column in Angular Material Table with filtering in angular?