Creating Buttons That Act Like Links in Angular

While working on a pet project in Angular tonight, I wanted to create some buttons that act like links. Turns out, this is easy -- just apply the routerLink directive to a button and it will act like a link. Here's an example:

<button class="btn btn-success" routerlink="/exercises/edit">Edit an Exercise</button>

Comments

Popular Posts

How to Get Norton Security Suite Firewall to Allow Remote Desktop Connections in Windows

The Cause and Solution for the "System.Runtime.Serialization.InvalidDataContractException: Type 'System.Threading.Tasks.Task`1[YourTypeHere]' cannot be serialized." Exception

Resolving the "n timer(s) still in the queue" Error In Angular Unit Tests

How to Determine if a Column Exists in a DataReader

Setting Default Values in an Angular Reactive Form