I have an angular component with a @Input parameter as follows.
@Component({
selector: 'app-transmission-history'
})
export class TransmissionHistoryComponent implements OnInit {
@Input() theRecord: Record = null;
constructor(private _transmissionHistoryService: TransmissionHistoryService) { }
}
In another component I have this in the markup:
<app-transmission-history [theRecord]="selectedRecord"></app-transmission-history>
Perfect. Everything works as expected.
I need to move the app-transmission-history component to a stand alone page. Now I need to access it with routerLink as follows:
<a routerLink='/transmissionHistory'>{{selectedRecord.Name}}</a>
I can't figure out how to set the @Input parameter in the routerlink in the markup. The value I need to set it to is selectedRecord, which I have access to.
I could make changes to the app-transmission-history component to receive the parameter another way. However, it does not seem flexible if I have to change the implementation based on how we get to it.