0

Im trying to hide some div if the checkbox is checked. When the box is checked is adds the md-checked class so i need to see if that is true and then hide the class notifications, is this the right approach ? Thank you

<div layout="row" layout-align="center center" layout-margin layout-fill class="confirm">
  <md-checkbox ng-if="md-checked ? true :  ????? " ng-model="" aria-label="">
  </md-checkbox>
  <a href="#" class="checkbox_alert"></a>
</div>

<div class="notification">
    <lib-notification text="{{error}}" type="danger" ng-if="error">
    </lib-notification>
</div>
2
  • Please use the angularjs-material tag. The angular-material tag is not meant for AngularJS questions. Commented Mar 1, 2018 at 18:56
  • Ok , Thank you ! Commented Mar 2, 2018 at 15:32

1 Answer 1

1

You need to set the ng-model for your checkbox and use it to determine if you should show the div

<input type="checkbox" ng-model="myCheckbox" aria-label="">
<div ng-hide="myCheckbox">Hide when checked!</div>
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.