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: ...
随机推荐
- [Angular2 Form] Create Radio Buttons for Angular 2 Forms
Using Radio Buttons in Angular 2 requires a basic understanding of forms as well as how their labels ...
- IDEA和Eclipse经常使用快捷键(Win Mac)
一. 代码生成/补全 Alt+回车 导入包,自己主动修正(Eclipse中Ctrl+Shift+O ) Alt+Inser 生成getter setter.构造器 Ctrl+Shift+Space( ...
- iOS开发——语法OC篇&Block回顾
Block回顾 这里知识简单介绍一下关于Block的语法,如果你觉得这里很简单或者想学习更深入的的使用清查看记者之前写的使用block传值和高级Block使用: http://www.cnblogs. ...
- C++11 之for 新解
前言 C++11这次的更新带来了令非常多C++程序猿期待已久的for range循环,每次看到javascript. lua里的for range.心想要是C++能有多好,心里别提多酸了.这 ...
- 从命令行运行django数据库操作
从命令行运行django数据库操作,报错: django.core.exceptions.ImproperlyConfigured: Requested setting DEFAULT_INDEX_T ...
- 引入第三方库错误Undefined symbols for architecture i386: _OBJC_CLASS_$的解决方案
引起标题上所导致的错误是因为你的第三方库没有放入到Compile Sources里面去. 需要到你项目的Targets>>Build Phases>>Compile Sourc ...
- 终端I/O之波特率函数
波特率(baud rate)是一个以往采用的术语,现在它指的是"位/秒"(bits per second).虽然大多数终端设备对输入和输出使用同一波特率,但是只要硬件许可,可以将它 ...
- 基于jQuery上下切换的焦点图—带缩略图悬浮
分享一款基于jQuery上下切换的焦点图,这款焦点图带有缩略图悬浮,它的切换效果比较简单,仅仅是作图片的上下切换,但是效果还是比较流畅的.这款jQuery焦点图插件的另外一个特点是在播放器上面可以悬浮 ...
- C++模拟Java“内部”类
代码思路来自Thinking in C++ 10.13.1内部类方法.类似多重继承,但是类型转换是单向的:Outer支持“向上”转型,但是不能“向下”转型回Outer. #include <io ...
- 【阿里云产品公测】PTS测试 SLB+ECS+RDS组合的DZ论坛负载极限压力,100并发2000页
作者:阿里云用户woaj01 环境介绍: 1.ECS:1核 1G 5M 杭州 2.RDS:240M 5G 杭州内网 3.SLB:私网实例 配置测试环境: 测试脚本: 1.生成参数文件,我的方 ...