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"的更多相关文章

  1. 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 ...

  2. 使用vant的时候,报错:component has been registered but not used以及vant的使用方法总结

    使用vant的时候,报错:component has been registered but not used以及vant的使用方法总结 在使用vant的时候. 想按需引入,于是安装了babel-pl ...

  3. 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 ...

  4. 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 ...

  5. 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 ...

  6. Vue报错:component has been registered but not used

    原因: ​​eslint​​代码检查到你注册了组件但没有使用,然后就报错了.比如代码: 比如​​Vue​​​中注册了​​File​​组件,而实际上却没有使用到(直接取消注册为好): ... impor ...

  7. laravel ajax提交报错Symfony\Component\HttpKernel\Exception\HttpException

    出现此种错误,通常是没有提交安全验证 params = { id: 2, _token: '{{ csrf_token() }}' } function cancel() { var url = &q ...

  8. SSM整合报错org.springframework.beans.factory.UnsatisfiedDependencyException

    我解决的办法是把.m2仓库所有文件删除,重新maven project就可以了. 但是在做这一步之前,报错如下: ①org.springframework.beans.factory.Unsatisf ...

  9. 【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: ...

随机推荐

  1. 腾讯微博java(android)sdk新增微博api详细介绍

    本文主要介绍腾讯微博android sdk中新增微博有关的8个接口,以及使用的示例代码 注意:以下所有的api示例代码都需要先新建QqTSdkService类对象qqTSdkService并初始化,见 ...

  2. ccConfig(设置一些底层接口状态:是否支持动作叠加 设置fps更新间隔和位置 是否画边框等。。)

    #ifndef __CCCONFIG_H__ #define __CCCONFIG_H__ #include "platform/CCPlatformConfig.h" /** @ ...

  3. Web前段优化,提高加载速度 css

    前言:  在同样的网络环境下,两个同样能满足你的需求的网站,一个"Duang"的一下就加载出来了,一个纠结了半天才出来,你会选择哪个?研究表明:用户最满意的打开网页时间是2-5秒, ...

  4. Disable right click on the website

    Many developers/website owners like to keep their website images personal and don't want anyone to c ...

  5. 10905 - Children's Game

    4th IIUC Inter-University Programming Contest, 2005 A Children’s Game Input: standard input Output: ...

  6. WPF 之 未捕获异常的处理

    首先,我们当然是要求应用程序开发人员,尽可能地在程序可能出现异常的地方都去捕捉异常,使用try…catch的方式.但是总是有一些意外的情况可能会发生,这就导致会出现所谓的“未捕获异常(Unhandle ...

  7. solr中竞价排名实现

    转载:http://mxsfengg.iteye.com/blog/308335 通常,lucene只返回与用户查询相关的文档,搜索的结果,跟lucene对文档评分有关.而在现实的查询中,我们有些时候 ...

  8. iOS UIImage DownLoad图片的下载缓存全部在此

    iOS图片的下载缓存全部在此 分类: iOS编程 -- : 2075人阅读 评论() 收藏 举报 注意: 我的文章只写给自己看 ------------------------------------ ...

  9. [课程相关]附加题——stack的理解

    一.stack的三种解释 stack有三种解释,我个人理解如下. 1.用户自定义的stack 用户自定义的stack就是一般意义上的后进先出队列,从名字上就能理解了,stack由下向上增长,有一个顶指 ...

  10. c语言中赋值语句的结果

    c语言中赋值语句的结果 最近在看<C语言接口与实现>,在第一章就发现一个以前很少用到的用法.在实现strcpy函数时,书中给出了两种实现. //version 1, 使用数组实现(新手惯用 ...