I have a scenario in which I use .NET MVC to serve the index.cshtml start page, which then provides all the Angular components needed to run the application with a single page. For routing, I use the excellent ui-router component with the Angular -UI command, and for the most part it works well.
My problem is loading the very first page. When viewed on a site, it does not go to the very first state / URL. It just loads my βshellβ with no content. My application configuration code is as follows:
app.config(function ($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise('/home');
$stateProvider
.state('home', {
url: "/home",
views: {
"content": {
templateUrl: "app/dashboard/dashboard.html",
controller: 'DashboardController'
},
"subNav": {}
},
});
( ui-sref), . .
, .NET MVC - , , , :
routes.MapRoute(
name: "Default",
url: "{*url}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
, , . , , .
?