Hi,
I have a button than contains “Continue” or “Save” text conditionally:
Is this the correct way to get this or there are a better way?
Important: Text must be translated using ng2-translate.
Thanks in advance.
Hi,
I have a button than contains “Continue” or “Save” text conditionally:
Is this the correct way to get this or there are a better way?
Important: Text must be translated using ng2-translate.
Thanks in advance.
i would try ternary operator:
<button>
{{ canGoBack ? ('Save'|translate) : ('Content'|translate) }}
</button>
i think a div inside of a button is invalid html
Thank you @bengtler.
It works!