解决:生成IonicModule.forChild报错(Property 'forChild' does not exist on type 'typeof IonicModule'.)

来源:互联网 发布:linux tail -f 编辑:程序博客网 时间:2024/05/17 02:49

目前,在使用 ionic g page xxxx 生成ionic2组件时,报错:


Property 'forChild' does not exist on type 'typeof IonicModule'.


解决办法:


第一步:将IonicModule.forChildIonicModule改成:IonicPageModule.forChild

第二步:修改引入:import {IonicPageModule } from 'ionic-angular';

1 0
原创粉丝点击