Component String to be evaluated by RouterLink in Template (Angular) -
i'm trying [routerlink] evaluate object in *ngfor has string value of code needs evaluated.
<ul> <li *ngfor="let item of componentvar"> [routerlink]="item.routerlink" > </li> </ul> component
export component { public componentvar [ { name: 'list item', routerlink: "['', { outlets: { 'app-popup': ['popupcomponent'] } }]", index: 4 }, ] } whenever @ router logs though shows encoded version of this. e.g.
url: "/path/%5b''%2c%20%7b%20outlets%3a%20%7b%…pp-popup'%3a%20%5b'popupcomponent'%5d%20%7d%20%7d%5d"
how can routerlink evaluate route works , url log be:
/path/(app-popup:popupcomponent)
for evaluation of string, sending formated url managed results only when i'm not giving outlet. looks there problem router parser somewhere. (in example shouldnt send item.routerlink , not item.value ?)
component.ts
public test = "/update-manager/applications/(view2:new)"; template.html
<button [routerlink]="test">test</button> result
<button ng-reflect-router-link="/update-manager/applications/(">test</button>
Comments
Post a Comment