# Storing/Retrieving Navigation Menus/Route in Database

**URL:** <https://discourse.aurelia.io/t/storing-retrieving-navigation-menus-route-in-database/1071>\
**Category:** Help Requests\
**Created:** [April 12, 2018, 7:54am UTC](https://discourse.aurelia.io/t/storing-retrieving-navigation-menus-route-in-database/1071 "2018-04-12T07:54:15Z")\
**Posts on this page:** 11\
**Page:** 2

<div class="post-metadata">

**Author:** ![MaximBalaganskiy](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/maximbalaganskiy/32/831_2.png) [@MaximBalaganskiy](https://discourse.aurelia.io/u/MaximBalaganskiy)\
**Post date:** [April 17, 2018, 12:33am UTC](https://discourse.aurelia.io/t/storing-retrieving-navigation-menus-route-in-database/1071/21 "2018-04-17T00:33:31Z")

</div>

As for the missing modules, I observed that with npm \<5.8 - packages installed directly from git repositories were constantly being deleted. Don’t observe this in npm@5.8.0

---

<div class="post-metadata">

**Author:** ![MaximBalaganskiy](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/maximbalaganskiy/32/831_2.png) [@MaximBalaganskiy](https://discourse.aurelia.io/u/MaximBalaganskiy)\
**Post date:** [April 17, 2018, 3:17am UTC](https://discourse.aurelia.io/t/storing-retrieving-navigation-menus-route-in-database/1071/22 "2018-04-17T03:17:28Z")

</div>

The promised repo

> [@Dotnet+webpack4+bootstrap4 skeleton app](https://discourse.aurelia.io/t/dotnet-webpack4-bootstrap4-skeleton-app/1080):
>
> [Here](https://github.com/MaximBalaganskiy/AureliaDotnetTemplate) is the dotnet skeleton app with typescript, sass, bootstrap4, jquery, and webpack4

---

<div class="post-metadata">

**Author:** ![lvparkington](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/lvparkington/32/736_2.png) [@lvparkington](https://discourse.aurelia.io/u/lvparkington)\
**Post date:** [April 17, 2018, 9:14am UTC](https://discourse.aurelia.io/t/storing-retrieving-navigation-menus-route-in-database/1071/23 "2018-04-17T09:14:57Z")

</div>

Thanks. We’re hoping to keep dependencies (including node packages, builders, bundlers) to a minimum where possible (even a simple SPA project has 12,000+ files) 🙂

---

<div class="post-metadata">

**Author:** ![lvparkington](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/lvparkington/32/736_2.png) [@lvparkington](https://discourse.aurelia.io/u/lvparkington)\
**Post date:** [April 17, 2018, 9:28am UTC](https://discourse.aurelia.io/t/storing-retrieving-navigation-menus-route-in-database/1071/24 "2018-04-17T09:28:57Z")

</div>

The reference ([https://stackoverflow.com/questions/41577897/aurelia-easy-way-to-create-nested-multi-level-navigation-menu](https://stackoverflow.com/questions/41577897/aurelia-easy-way-to-create-nested-multi-level-navigation-menu)) used a subRoutes property but horrible to implement (see below hardcoding :-O). Your suggestion appears the way to go. Thanks.

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/aurelia/original/1X/62254cd651a0ff386129af1da78882aa89614654.png)

---

<div class="post-metadata">

**Author:** ![lvparkington](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/lvparkington/32/736_2.png) [@lvparkington](https://discourse.aurelia.io/u/lvparkington)\
**Post date:** [April 18, 2018, 8:15am UTC](https://discourse.aurelia.io/t/storing-retrieving-navigation-menus-route-in-database/1071/25 "2018-04-18T08:15:10Z")

</div>

Regarding the ‘new dotnet skelton app’ afraid I could not get it to run. Simply downloaded from repository, compiled, and attempted to run with no changes. I’m getting System.AggregateException error possibly webpack related?. Using VS 2017 Community 15.6.1

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/aurelia/original/1X/f5e07b2fc324f39a20e2fbd7a85cb15aa0395e57.png)

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/aurelia/original/1X/04009335795b22f92fac5b4b9d9f3b4c59a92567.png)

Are there any prerequisites that may have been missed?

---

<div class="post-metadata">

**Author:** ![MaximBalaganskiy](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/maximbalaganskiy/32/831_2.png) [@MaximBalaganskiy](https://discourse.aurelia.io/u/MaximBalaganskiy)\
**Post date:** [April 18, 2018, 8:50am UTC](https://discourse.aurelia.io/t/storing-retrieving-navigation-menus-route-in-database/1071/26 "2018-04-18T08:50:05Z")

</div>

You might have different global webpack version

---

<div class="post-metadata">

**Author:** ![MaximBalaganskiy](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/maximbalaganskiy/32/831_2.png) [@MaximBalaganskiy](https://discourse.aurelia.io/u/MaximBalaganskiy)\
**Post date:** [April 18, 2018, 10:57am UTC](https://discourse.aurelia.io/t/storing-retrieving-navigation-menus-route-in-database/1071/27 "2018-04-18T10:57:09Z")

</div>

It’s recommended that you remove global webpack  
`npm uninstall webpack -g`

then  
`npm i`

then  
`dotnet restore`  
`dotnet run`  
or  
F5 in VS

---

<div class="post-metadata">

**Author:** ![lvparkington](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/lvparkington/32/736_2.png) [@lvparkington](https://discourse.aurelia.io/u/lvparkington)\
**Post date:** [April 18, 2018, 12:47pm UTC](https://discourse.aurelia.io/t/storing-retrieving-navigation-menus-route-in-database/1071/28 "2018-04-18T12:47:16Z")

</div>

Thanks. We may be using the old versions for first build and then use the latest template. Then next versions of Net Core and Entity Framework Core will no doubt be ready to download 🙂

---

<div class="post-metadata">

**Author:** ![lvparkington](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/lvparkington/32/736_2.png) [@lvparkington](https://discourse.aurelia.io/u/lvparkington)\
**Post date:** [May 3, 2018, 12:47pm UTC](https://discourse.aurelia.io/t/storing-retrieving-navigation-menus-route-in-database/1071/29 "2018-05-03T12:47:25Z")

</div>

I’ve copied code to another project and it no longer works. The only navigation that is present is the home page. The AddRoute() and router.refreshNavigation() have stopped working. I get the webpack hot module update error message below. Any ideas what I need to do to get it working?  
 ![image](https://canada1.discourse-cdn.com/flex027/uploads/aurelia/original/1X/57de60421945bcb2d6e0cf5949176bed28b99cb6.png)

---

<div class="post-metadata">

**Author:** ![MaximBalaganskiy](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/maximbalaganskiy/32/831_2.png) [@MaximBalaganskiy](https://discourse.aurelia.io/u/MaximBalaganskiy)\
**Post date:** [May 3, 2018, 11:25pm UTC](https://discourse.aurelia.io/t/storing-retrieving-navigation-menus-route-in-database/1071/30 "2018-05-03T23:25:37Z")

</div>

If it works in one project and does not in another I would check if the setup is identical.

---

<div class="post-metadata">

**Author:** ![lvparkington](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/lvparkington/32/736_2.png) [@lvparkington](https://discourse.aurelia.io/u/lvparkington)\
**Post date:** [May 4, 2018, 8:39am UTC](https://discourse.aurelia.io/t/storing-retrieving-navigation-menus-route-in-database/1071/31 "2018-05-04T08:39:39Z")

</div>

I forgot that had added a compose view model to show a diary component at the right hand side. Adding this to the new project enabled it to work. Thanks! The app.html is as follows:

![image](https://canada1.discourse-cdn.com/flex027/uploads/aurelia/original/1X/b9017275beff19fcb5f50fcd8a0a7f5b1d3b85ee.png)

[Previous page](https://discourse.aurelia.io/t/storing-retrieving-navigation-menus-route-in-database/1071.md?page=1)
