Two the same id in Ionic html

Hi all ! Could anyone suggest please … is it possible to see two the same id Ionic html ?

When it happend I have a problem with javascript,needed page dose not rebuilt, some javascript event dose not run … I do not understand why … It happend when I go through pages back and forth,go back …

I only see one id - the other occurence could be anything. Show us the actual search result.
Also show us the code that created this please. Did you set the IDs?

Sujan12,good day ! No problem … it is my developer tool … I inspect real device … Ionic3 built me two the same page !

Did you set the IDs?

Yes, It is my .html file.

What kind of navigation are you using?
How and where are you using this page in your app?

What exactly is not working? What code is behind the not working functionality?

Sujan12, good day !

What kind of navigation are you using?

 <button (click)="showHotSpot(i,j)" clear icon-only ion-button color="dark">
      <ion-icon name="eye"></ion-icon>
   </button>
  showHotSpot(i, j) {
      this.navCtrl.push(ContentPage, {
        item: res,
        model_id: this.orderedParts[i].model.get("external_id"),
      });
  }

How and where are you using this page in your app?

Standart page like other page … nothing unusual …

What exactly is not working? What code is behind the not working functionality?

It seems like I see not necessary page without HotSpots… only standart image …

Sujan12, maybe I undertsand what is the problem …when I run showHotSpot … ContentPage already exist in navigation stack and I add it to navigation stack again … so I see two the same pages … but how to solve this problem ?

That would make sense. You would be easily able to create multiple instances of the same page. So your solution is also pretty simple: don’t create an ID for those pages. Where you need those for anyways? Since they are clearly not unique in your use case.

luukschoen,good day ! ID for those pages it is not a problem I think … it is just html … problem in that I see at the phone not needed page becouse their two …

Ok now we know by the same page is there twice.

Now what is the problem with that? Don’t do anything with IDs.

Sujan12,could I check if page exists in the navigation stack ? If yes remove it, it no go to …

Why would you want to do that?

Sujan12,because if i have two the same page in navigation stack this.navCtrl.push return page without functionality …

Care to explain why it would return a page without functionality ? I can’t follow why this would be the case.

luukschoen,in normal situation i have page with image where above this image I drow HotSpots with javascript, but when in navigation stack two pages … I see page with clear image without HotSpots …

Then fix your page’s code to work all the time and don’t mess with the navigation stack.

Sujan12,problem dose not solve … it understandable situation for me … why Ionic add two the same pages in the stack …

Your first two sentences make no sense.

Because you navigated to the same page twice in different locations of the stack.

It clearly has to do with the code you’re using to draw on the pages. It has nothing to do with the duplicates pages, since that makes sense. As @Sujan12 said, off course you would have two pages if you push it to the stack twice. Nothing wrong with that.

Maybe we can help figure out why the drawing only works on the single instance? Could you show us the code you’re using to draw the hotspots?

luukschoen, thanks for help … I have a lot of code in different place … It is difficult to show … if it exist way not to add two the same page to stack … check kind of …

Sorry, can’t help you any further then I suppose. You should fix up your code, pretty sure those two pages aren’t your real problem here.