[英]Can't scroll using Ionic and Angular Material
我是Ionic的新手,正在使用具有一系列形式的垂直垫板式步进器。 我无法弄清楚为什么尽管页面上的内容不在页面上,页面上的内容也不会滚动。
我尝试使用溢出:在不同位置自动/滚动并添加离子含量,但是离子含量只会导致含量消失(控制台中没有错误)。
缩写代码以删除表单和其他无关的html。
<mat-card style="min-height: 100%">
<mat-card-content>
<app-login (action)="toggleComponents($event)" *ngIf="action === 'login'; else register"></app-login>
<ng-template #register>
<ion-content>
<app-register (action)="toggleComponents($event)"></app-register>
</ion-content>
</ng-template>
</mat-card-content>
</mat-card>
以下是应用程序注册组件:
<mat-vertical-stepper linear="false" #stepper fxLayout="column">
<mat-step>
<ng-template matStepLabel>Form One</ng-template>
<form>...</form>
</mat-step>
<mat-step>
<ng-template matStepLabel>Form Two</ng-template>
<form>...</form>
</mat-step>
</mat-vertical-stepper>
我还没有测试过,但是我预感这与离子含量和垫卡含量的组成有关。 我将使离子含量成为最外层的容器元素,并将垫卡嵌入其中。
<ion-content>
<mat-card style="min-height: 100%">
<mat-card-content>
<app-login (action)="toggleComponents($event)" *ngIf="action === 'login'; else register"></app-login>
<ng-template #register>
<app-register (action)="toggleComponents($event)"></app-register>
</ng-template>
</mat-card-content>
</mat-card>
</ion-content>
还要在此处检出离子含量的离子文档: https : //ionicframework.com/docs/api/content和离子布局系统上的文档: https : //ionicframework.com/docs/layout/structure
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.