Home Can angular have the same ng-if used several times on the page
Reply: 0

Can angular have the same ng-if used several times on the page

user1711 Published in July 20, 2018, 5:04 am

I cannot see the issue in my html, but i can get the show/hide to work properly for a portion but not for another portion. It is the same ng-model. I am checking to see if feedback exists, if it does show one area, hide another. It is only working for the checklist. The checklist show and hides properly, but the message needs to display if the checklist is hidden. I know this is really simple, but no idea why it won't showing/hiding but i think it boils down to using feedback.length more then once. Can I do that? I have tried ng-if="feedback.length>0" and also ng-show="feedback.length>0" inside of the div for myMessage. The checklist is the only one that hides.

<div class="col-md-3" id="myMessage" ng-if="feedback.length>0">
  <div class="alert alert-success">You have already submitted feedback for this user.</div>

<div class="col-md-3" id="checkList" ng-if="feedback.length==0">
  <div class="row">
    <div class="panel panel-default questionHolder2">
      <div class="panel-heading"><strong>Thesis</strong></div>
      <div class="panel-body">
        1. After reading, but looking back at the paper now, can you summarize or paraphrase the author's argument or main point that s/he is trying to convey to the reader?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.312871 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO