Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Lazy Load Module - Angular MVC Template - Hard reload doesn't work? #848

Closed
@aherrick

Description

@aherrick

I'm seeing something strange.

I've followed this to enable Lazy Loading of modules in my App.

7ded0a0

Once the App loads and I navigate to the route via URL it works without issue. URL is /configuration just to note.

However, once I'm on that /configuration module, if I do a hard refresh, it's like the MVC backend kicks in and attempts to resolve the Controller/Action (which obviously doesn't exist)

1

My MVC routes haven't changed and are base:

            app.UseMvc(routes =>
            {
                routes.MapRoute(
                    name: "default",
                    template: "{controller=Home}/{action=Index}/{id?}");

                routes.MapSpaFallbackRoute(
                    name: "spa-fallback",
                    defaults: new { controller = "Home", action = "Index" });
            });

Am I missing something here? Why would "MVC" be trying to load /configuration instead of letting it fall to Angular?

NOTE: If I change the route to "config" reloading/navigating works as expected. Is something special about "configuration" (seems very odd to me unless I'm overlooking something)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions