Open href using tab

please can someone help me?

I’m trying to open a router.view through a function.

This is because I need to validate a click on the button.

<a href="#" class="button button-fill" onclick="validateTerms()">

validateTerms(){
          app.views.main.router.navigate('/auth-user/');
     },

but the page opens in another tab on the home

exemple

Please, Help… I`m need.
Por favor alguem me ajude com isso estou a dias procurando uma solucao.

Apparently because you call .navigate method on MAIN router (which is main view). Call on relevant View’s router

Hello Wladmir, thanks for the reply, I thought it might be something like that, but I don’t know how to do it can you give me an example please.

thanks.

see my index.html

your index.html is not helpful. Show at the least the code of the page where you call it

Okay, thanks again for all the help.

Here’s what I need the user to accept the terms before continuing as soon as he clicks on the checkbox he goes to the next screen but I need to call the next screen via function
as follows in the images.

my router.js

{
name:‘auth-user’,
path: ‘/auth-user/’,
url: ‘./pages/auth-user.html’,
},

Have you try this?:

app.views.current.router.navigate('/auth-user/');

Because main is the view-main tab and you want to change the content of another different tab view not the first one… If you don’t know what is the view… Maybe it can be just the current one…
Hope it helps

1 Like

I feel like an idiot now, I didn’t know the prop current for the router… it worked really well, thank you all… !