I have recently tried to change a label of <ui:button>
by myself using component.set()
method:
component.find('Btn1').set('v.label', 'New Label');
and it absolutely works. Can you please provide an error message, because it should work and probably the issue is caused by something else?
Since of API version 47.0
<ui:button>
is deprecated. Use<lightning:button>
,<lightning:buttonIcon>
, or<lightning:buttonIconStateful>
instead.