1

I am trying to build an Angular JS app where a certain block of HTML is replaced by another one (both are input forms) and they should both be in the same location.

I have used ng-show/hide and it works with regards to the hiding/showing. The only problem is that the second peace of html doesn't appear on the same location as where the previous one was located but next to it (feels like the second one is still "there" but invisible.

Is there another way of doing this or does this work for anyone else?

Aurelio
  • 24,702
  • 9
  • 60
  • 63
  • 3
    Hello. I just read about ngIf, seems to be the answer? Will try that out and post the outcome. – Steffen Brueckner May 17 '15 at 12:48
  • that shouldn't be happening as ng-hide uses `display : none`. basic jsfiddle here to show the behaviour: http://jsfiddle.net/9dwpdkLk/ Are you overriding the .ng-hide css by any chance with your custom styles? I would suggest you check the styles of that "hidden" element. – suvartheec May 28 '15 at 19:16

0 Answers0