0
votes

I want to open item in new page when visitor will click btn with icon search. I want redirect just item1 to new page and show more details about item1. I saw same solutions like: window.location='app2.html; or location.replace('https://...') Is better way to do it ?

   //app1.html  page1
    <div class="container">
     
       // item 1
         <div class="col-md-3 text-center border border-light m-4">
          <img src="..." alt="..."><br>
          <button class="btn btn-primary">
            <i class="bi bi-search" data-id="1"></i>   // here is btn with id
          </button>
         </div>

       // item2, ...

    </div>


  //app2.html page2  // new page 
  
Why don't you just create a <a> component with href etc and just let it do his job when clicking on it ?Peterrabbit
I will have 10 items . I want to open specific item in secound page with specific items data.ocko
You can use a href and pass the query string along with the items and in next page fetch the query string and do you job on the basis of thatAmit Gupta