I have routes that have parameters.
How do we add these to the AppMenuItem definitions?
5 Answer(s)
-
0
Hi @velu,
You can set it like below;
new AppMenuItem('Users', 'Pages.Administration.Users', 'flaticon-users', '/app/admin/users',[],false, {id: 1, age: 2})
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Thanks for help.
But how to read on landing page?
Please guide us in detail.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
For the landing page, you need to modify root-routing.module.ts or auth-route-guard.ts
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Please check below mentioned code.
new AppMenuItem('Transactions', '', 'flaticon-list-3', '', [ new AppMenuItem('Market', '', 'flaticon-app', '', [
new AppMenuItem('Sell', null, 'fa fa-circle-o', '/app/main/Market', [], false, { MODE: 'S' }), new AppMenuItem('Buy', null, 'fa fa-circle-o', '/app/main/Market', [], false, { MODE: 'B' }) ]), ]),We are using same route for both menus. When we click first (Sell) menu Parameter value getting properly, But after clicking on Second (Buy) Menu we are not getting changed parameter value in queryParams.
May be Market.component.ts page is not refreshed after clicking Second menu.
this.modeText = this._activatedRoute.snapshot.queryParams['MODE'] || '';
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hi @velu
I understand the problem now. Could you create an issue on https://github.com/aspnetzero/aspnet-zero-core/issues ? We will test and fix this for the next release.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)