I'm developing an ASP.Net Core Application that uses AngularJS (version 1). I've got a problem that when I run/launch the application, the home URL always comes out to:
http://localhost:59745/#!/
The specific question I have is towards why it's saying /#!/
and not just the expected root /
.
My Startup.cs
that declares the MapRoute
for the application:
app.UseMvc(config =>
{
config.MapRoute(
name: "Default",
template: "{controller}/{action}/{id?}",
defaults: new { controller = "App", action = "Index" }
);
});
My app.js
declaring the angular seeding for the application/module:
var app = angular.module('myScheduler', ['ngStorage', 'ngRoute'])
.config(function ($routeProvider) {
$routeProvider.when("/", {
controller: "homeController",
controllerAs: "vm",
templateUrl: "/views/home.html"
});
$routeProvider.otherwise({
controller: "loginController",
controllerAs: "vm",
templateUrl: "/views/login.html"
});
});
Why is my URL showing the way it is, and how can I default it to just the root /
rather than /#!/
?