I want to add multiple style attribute for accordion group using ng-style
with conditions as ng-class
is not working with accordion.
Here is how i am trying:
ng-style="{ border: ivrMessageForm.ivr_messagetitle.$error.required && !isFormValid ? '2px solid' : 'none' }"
this is working fine. but want to add border-color
too.
I tried this:
ng-style="{ border: ivrMessageForm.ivr_messagetitle.$error.required && !isFormValid ? '2px solid' : 'none', border-color: ivrMessageForm.ivr_messagetitle.$error.required && !isFormValid ? 'red' : 'none'}"
but it gives me parse error.
i also tried this one but same parse error:
ng-style="ivrMessageForm.ivr_messagetitle.$error.required ? {border:'3px solid', border-color: 'red'} : {border:'none', border-color: 'none'}"
can anyone help me how to add multiple style attributes with multiple conditions using ng-style.