Rah*_*hul 2 ionic-framework angular ionic4
我在Ionic 4应用程序中工作,并且已经将幻灯片导入了我的应用程序,但显示错误。
这是我的intro.page.ts:
import { Slides } from '@ionic/angular';
@Component({
selector: 'app-intro',
templateUrl: './intro.page.html',
styleUrls: ['./intro.page.scss'],
})
export class IntroPage implements OnInit {
@ViewChild('slides') slides: Slides;
constructor(private storage: Storage, private router: Router) { }
ngOnInit() {
}
next() {
this.slides.slideNext();
}
}
Run Code Online (Sandbox Code Playgroud)
错误:
模块'“ ../../../../../Users/challengesnew/node_modules/@ionic/angular/dist/core”'没有导出的成员'Slides'。
任何帮助深表感谢。
According to the GitHub issue and the mentioned changelog,
all ionic components are prefixed with Ion if you want to import.
Change your import to:
import { IonSlides } from '@ionic/angular';
Run Code Online (Sandbox Code Playgroud)
and
@ViewChild('slides') slides: IonSlides;
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
409 次 |
| 最近记录: |