I tried the expressions
{{}} and "" in the view/template using the component variable but the
problem is they don't get updated after the service is called.
i.e. I am trying to disable the controls and later on add some text in
controls after the http web service call is completed so i can perform
business logic and make decision
The disable doesn't work, although i am able to update the text
<input style="width: 400px" *readonly="disabled"* type="text"
class="form-control" id="ProjectTitle" name="ProjectTitle" maxlength="200"
minlength="5" required alphaNumeric *[(ngModel)]="modelNAR.ProjectTitle"*
#ProjectTitle="ngModel" >
*OR*
<input style="width: 400px" *readonly="modelNAR.Disabled"* type="text"
class="form-control" id="ProjectTitle" name="ProjectTitle" maxlength="200"
minlength="5" required alphaNumeric [(ngModel)]="modelNAR.ProjectTitle"
#ProjectTitle="ngModel" >
On Monday, March 13, 2017 at 8:01:29 PM UTC-7, Sander Elias wrote:
>
> Hi Celerity,
>
> You better use an expression context for the readonly attribute. This is
> explained in the template syntax docs
> <https://angular.io/docs/ts/latest/guide/template-syntax.html>
>
> Regards
> Sander
>
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.