You cannot.
You cannot use path to a .cshtml file in your template url of your angular route. Can you open the .cshtml file in your browser ? No right ? The same thing applies here.
Workaround :
.cshtml file contains server side code, to render it you need to use a controller and action. They will render that .cshtml file for you. So have a controller action return that view for you and use the url to the controller action in your angular route.
eg:
state('app.dashboard', {
url: '/dashboard',
templateUrl: '/dashboard/index'
})
with
public class DashboardController : Controller
{
public ActionResult Index()
{
return View();
}
}
p.s: have tried and this worked for me
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…