0

I am working on audio player in angularjs. I have customized the player according to the requirements but stuck with the mute button. In the demo link for demo

you will see a mute toggle button whose value is changing from true to false and vice versa when in toggles. I want to change the value from mute to muted and then again to mute. I have to make changes in main js file but getting confused.

How can I do that?

Thanks.

3
  • Have you tried something ? Commented Jul 22, 2015 at 9:14
  • Could you please share your code? Commented Jul 22, 2015 at 9:17
  • <button mute-music > {{ mute?"muted":"mute" }}</button> It worked for me Commented Jul 22, 2015 at 9:30

1 Answer 1

1

You could do something like this:

<button>{isMuted ? "Muted" : "Mute"}</button>

isMuted is your boolean flag which indicates if its muted or not.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.