1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

Angular 4 : Click on a link with parameters

Discussão em 'Angular' iniciado por sTg, Outubro 17, 2024 às 03:42.

  1. sTg

    sTg Guest

    I am quite new to Angular 4. I have an anchor tag which upon clicking it should redirect me to a link where I need to pass parameters as well. I am not sure if my approach is right or wrong. But more importantly, how do I pass parameters? I need guidance.

    form.component.html:

    <a (click)="myFunc()" href="" target="_blank">Go to mymodule</a><br />


    form.component.ts

    myFunc() {
    console.log("function called");
    window.open('../myURL/mypage.jsp?rurl=' + encodeURIComponent($('display').attr('href')));
    }

    Continue reading...

Compartilhe esta Página