Tuesday, 5 March 2019

Improving an old application - MVC Bundler

I'm maintaining an MVC application that was built in 2015. It works, but it doesn't work great, so today I'm looking at assets.

Thankfully at least it uses MVC Bundler for bundling and minification. This is a good tool for an app of this era.

These are the bundled scripts (only JS) according to Chrome:

Pass and receive data in Aurelia routes

Aurelia allows for a pretty flexible routing configuration. Your main router can call views which themselves contain sub-routers.

But how do you pass data into those sub-routes? What if your main router gets some data from the server that you don't want to re-get for every sub route?

Let's define a couple of routes, details and payments:

 
Copyright 2009 Another Blog. Powered by Blogger Blogger Templates create by Deluxe Templates. WP by Masterplan