How to set enable / disable the submit button

Mi4
Tera Expert

Hello,

I want to enable / disable the submit button depending on the person's attributes.

The following code doesn't work:

<input class = "input" type = "submit" value = "save" ng-click = "c.changed ()" role = "button" disabled = "c.data.flg">

(c.data.flg = true or false)

Do you have any ideas?

Thanks in advance,

1 ACCEPTED SOLUTION

kristian dimitr
Tera Guru

You can use the angular directive: ng-disabled="expression".

And take the flag from the server directly as follow: data.flg -> ng-disabled="data.flg"

 

Regards!

Kristian

View solution in original post

2 REPLIES 2

kristian dimitr
Tera Guru

You can use the angular directive: ng-disabled="expression".

And take the flag from the server directly as follow: data.flg -> ng-disabled="data.flg"

 

Regards!

Kristian

Thanks!I worked it!

Regards,