-1

I want to hide a div and show it on button click using angularJS? I used ng-show and ng-hide but it's not working

4
  • Post some code of what you tried so far. Commented May 10, 2016 at 13:44
  • Post your code please. The complete HTML for your page and if there's a controller, the javascript file as well. Commented May 10, 2016 at 13:45
  • Where's your code examples for this question? Commented May 10, 2016 at 14:15
  • i got an answer and got that fixed Thanks for your assistance Commented May 11, 2016 at 7:57

1 Answer 1

5
<div ng-show="anyVariable"></div>

<button ng-click="anyVariable = !anyVariable">Click</button>
Sign up to request clarification or add additional context in comments.

1 Comment

not working is there anything i need to do with Javascript?

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.