5

I notice that when Ionic renders the same template (for multiple views), I am forced into a situation where I have multiple elements of the same html id.

Hence, if I just plainly use document.getElementById(id), I find myself in situations where I do not get the element I want.

(I want the element inside the current rendered view, and not the element inside the template of some other view currently the user is not in)

How should I get around this? Is there a way to get an element from within the boundaries of the current view being rendered?

Rohan Büchner
  • 5,333
  • 4
  • 62
  • 106
dk123
  • 18,684
  • 20
  • 70
  • 77
  • you can use jqlite ,this is might help you http://stackoverflow.com/questions/23609171/how-to-get-element-by-classname-or-id – Anas Omar Sep 01 '15 at 13:44

0 Answers0