我使用ipconfig
构建了一个本机脚本项目,
它使用tns create appname --template ng
,nativescript文档说,最新的组件是启动的组件,我有要首先启动的页面,反正还有吗?
答案 0 :(得分:1)
您应该尝试将默认路由更改为app.routing.ts
中的所需组件
例如:
尝试更改以下代码
const routes: Routes = [
{ path: "", redirectTo: "/items", pathMatch: "full" },
{ path: "items", component: ItemsComponent },
{ path: "item/:id", component: ItemDetailComponent },
];
收件人
const routes: Routes = [
{ path: "", redirectTo: "/yourcomponent", pathMatch: "full" },
{ path: "items", component: ItemsComponent },
{ path: "item/:id", component: ItemDetailComponent },
{ path: "yourcomponent", component: YourComponent },
];