我正在开发Ionic 4应用程序,我有两个页面的身份验证和注册,我在“ app-routing.module”中添加了路由,将Authentication组件设置为root组件,因此,当我单击查看路线更改,并且不会显示注册视图:
App-routing.module
const routes: Routes = [
{ path: '', redirectTo: 'auth', pathMatch: 'full' },
{ path: 'auth', component: AuthenticationComponent },
{ path: 'registerFirst', component: RegistrationComponent},
];
...
这是认证视图内的按钮
<ion-button expand="full" color="medium" [routerLink]="['/registerFirst']">CREATE AN
ACCOUNT</ion-button>
像这样更改路由: