Javascript 在Angular js中如何使用路由(控制器和方法名称)
在js函数中使用此选项,但此选项不起作用。您需要导入“路由”模块,以便在Angular中使用路由。导入后,您需要使用数组指定对象中的路径和组件。 例如:Javascript 在Angular js中如何使用路由(控制器和方法名称),javascript,angularjs,asp.net-mvc,Javascript,Angularjs,Asp.net Mvc,在js函数中使用此选项,但此选项不起作用。您需要导入“路由”模块,以便在Angular中使用路由。导入后,您需要使用数组指定对象中的路径和组件。 例如: 干杯 给我一个解决方案,你可以很容易地找到如何做轮班。这是给我的。他要的是angularjs。是的,我告诉过angular only@SaimaHaji这很有效。var url='';url=“…控制器/方法”;window.location.href=url window.location.href ='@Url.Action("Redire
干杯 给我一个解决方案,你可以很容易地找到如何做轮班。这是给我的。他要的是angularjs。是的,我告诉过angular only@SaimaHaji
这很有效。var url='';url=“…控制器/方法”;window.location.href=url代码>
window.location.href ='@Url.Action("Redirect", "Dashboard")'
const routes: Routes = [{
path:'',
pathMatch:'full',
component:WeatherViewComponent
}];