Browser address will not be displayed correctly in ui-route

前端 未结 2 728
北荒
北荒 2020-12-12 01:17

I am using the following example :

http://angular-ui.github.io/ui-router/sample/#/

Default Page URL in the example above :

 http://angular-u         


        
2条回答
  •  一整个雨季
    2020-12-12 01:37

    First, I'm change the templateUrl to

     templateUrl: '/Scripts/ui-route/home/home.html',
    

    Then, I changed the code as follows:

          public ActionResult Index()
            {
                var path = Request.Path;
    
                if (path == "/Admin")
                {
                    return Redirect("/Admin/");
                }
    
                return View();
            }
    

    It works.

提交回复
热议问题