ionic2 Navigation实现报错:No component factory found for "MyComponent"
ionic2 写的代码里面,跳转的时候报了一个 No component factory found for “RechargeSucceed”
recharge() {
let actionSheet = this._actionSheetCtrl.create({
title: '付款详情',
buttons: [{
text: '确认付款',
handler: () => {
let navTransition = actionSheet.dismiss();
navTransition.then(() => {
this.nav.push(RechargeSucceed);
})
}
}]
});
actionSheet.present();
}
对应页面中的代码并没有错,在网上一查,发现是:app.module.ts中全面初始化并定义了项目中的模块,所以当跳转到详情页面的时候便新增了一个详情页的模块,此时没有及时更新app.module.ts中的内容。所以会报此错误。
解决办法:在app.module.ts 中引入新模块,并在declarations,entryComponents里面添加新模块即可。
ionic2 Navigation实现报错:No component factory found for "MyComponent"的更多相关文章
- vue报错:Component template should contain exactly one root element. If you are using v-if on multiple elements, use v-else-if to chain them instead.
在.vue文件中引入了 element-ui 的 table 和 pagination 组件后,报错:Component template should contain exactly one roo ...
- 使用vant的时候,报错:component has been registered but not used以及vant的使用方法总结
使用vant的时候,报错:component has been registered but not used以及vant的使用方法总结 在使用vant的时候. 想按需引入,于是安装了babel-pl ...
- Java报错: A component required a bean of type 'com.sirifeng.testmybatis.mapper.BookMapper' that could not be found.
在学习Spring-boot-mybatis时,报错A component required a bean of type 'com.sirifeng.testmybatis.mapper.BookM ...
- VUE之命令行报错:Component template should contain exactly one root element. If you are using v-if on multiple elements, use v-else-if to chain them instead 解决办法
Failed to compile. ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-5992 ...
- laravel 5.5 运行在 php7.0 报错 Symfony\Component\Translation\Translator.php FatalThrowableErrorParse error: syntax error, unexpected '?', expecting variable (T_VARIABLE)
问题描述 报错原因是 php-cli 版本是 7.1.x,运行 composer create-project ... 命令时安装的依赖包会自动适配到当前 php 版本 7.1.x.如果 php-fp ...
- Vue报错:component has been registered but not used
原因: eslint代码检查到你注册了组件但没有使用,然后就报错了.比如代码: 比如Vue中注册了File组件,而实际上却没有使用到(直接取消注册为好): ... impor ...
- laravel ajax提交报错Symfony\Component\HttpKernel\Exception\HttpException
出现此种错误,通常是没有提交安全验证 params = { id: 2, _token: '{{ csrf_token() }}' } function cancel() { var url = &q ...
- SSM整合报错org.springframework.beans.factory.UnsatisfiedDependencyException
我解决的办法是把.m2仓库所有文件删除,重新maven project就可以了. 但是在做这一步之前,报错如下: ①org.springframework.beans.factory.Unsatisf ...
- 【spring boot】使用注解@ConfigurationProperties读取配置文件时候 报错 org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'rocketmqAutoConfiguration': Unsatisfied dependenc
如题,配置文件如下: #注册中心配置 eureka: instance: instanceId: ${spring.application.name}:${random.int} hostname: ...
随机推荐
- stm32 IAP + APP ==>双剑合一
(扩展-IAP主要用于产品出厂后应用程序的更新作用,上一篇博文详细的对IAP 升级程序做了详细的分析http://blog.csdn.net/yx_l128125/article/details/12 ...
- Oracle DB 管理数据库的空间
• 描述4 KB 扇区磁盘的概念及使用 • 使用可移动表空间 • 描述可移动表空间的概念 数据库存储 数据库存储 数据库包括物理结构和逻辑结构.由于物理结构和逻辑结构是分开的,因此管理数据的物 理存储 ...
- [ES6] 13. Using the ES6 spread operator ...
The spread operator (...) allows you to "explode" an array into its individual elements. S ...
- cocos2dx 读取json及解析
ball.json 数据例如以下: { "entities": [ { "entity": { "TapOpposite": 0, &quo ...
- 给指针malloc分配空间后就等于数组吗?
首先回答这个的问题:严格的说不等于数组,但是可以认为它是个数组一样的使用而不产生任何问题.不过既然这样,那它应该算是个数组吧.所以,一般我们都用“动态数组”这种名字来称呼这种东西. 要讲清楚这个东西, ...
- 主流手持设备GPU性能比较
设备 GPU CPU 每秒像素填充率 每秒三角形生成 内存 iPhone4 PowerVR SGX 535 ARM Cortex-A8 800M 512M iPod touch 4 Power ...
- android之存储篇——SQLite数据库
转载:android之存储篇_SQLite数据库_让你彻底学会SQLite的使用 SQLite最大的特点是你可以把各种类型的数据保存到任何字段中,而不用关心字段声明的数据类型是什么. 例如:可以在In ...
- initrd映像文档的作用和制作
1.http://pan.baidu.com/s/1dDrGeKL 2.http://wenku.baidu.com/link?url=qPa_jfkEZCbERnwMYWLwm9EZJ_ebMRJA ...
- LeetCode42 Trapping Rain Water
题目: Given n non-negative integers representing an elevation map where the width of each bar is 1, co ...
- A*算法解决八数码问题 Java语言实现
0X00 定义 首先要明确一下什么是A*算法和八数码问题? A*(A-Star)算法是一种静态路网中求解最短路径最有效的直接搜索方法也是一种启发性的算法,也是解决许多搜索问题的有效算法.算法中的距离估 ...