Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to specify replace url option in router link angular html template

Tags:

html

angular

 <button color="dark" fill="outline"  [routerLink]="['/home']" size="medium"
          >Click here to add some</button>

how should I pass replace URL option just like we do in the TS file

 await this.router.navigate(['/profile'], { replaceUrl: true });
like image 244
Divek John Avatar asked Oct 29 '25 16:10

Divek John


1 Answers

I found it myself by seeing type file of angular routing :) here is how I do it

<button color="dark" fill="outline" replaceUrl="true"   routerLink="['/home']" size="medium"
              >Click here to add some</button>
like image 181
Divek John Avatar answered Oct 31 '25 07:10

Divek John



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!