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: ...
随机推荐
- 大礼包!ANDROID内存优化(大汇总)
写在最前: 本文的思路主要借鉴了2014年AnDevCon开发者大会的一个演讲PPT,加上把网上搜集的各种内存零散知识点进行汇总.挑选.简化后整理而成. 所以我将本文定义为一个工具类的文章,如果你在A ...
- 【JavaScript】关于delete
delete 只能删除属性,不能删除变量 比如 var m = "haha"; delete m; //false m = "haha";----->wi ...
- Redis for Windows(C#缓存)安装和使用
Redis for Windows(C#缓存)安装和使用 前言 前段时间写过两篇简单的有关Memcached缓存的相关文章,当然了只是入门的如何使用而已.最近这两天又发现了Redis这个神奇的东西,之 ...
- android 自定义ViewGroup和对view进行切图动画实现滑动菜单SlidingMenu
示意图就不展示了,和上一节的一样,滑动菜单SlidingMenu效果如何大家都比较熟悉,在这里我简单说明一下用自定义ViewGroup来实现. 实现方法:我们自定义一个ViewGroup实现左右滑动, ...
- Lvalue, Rvalue, Xvalue, Prvalue, Glvalue
c++11中关于什么是lvalue, 什么是rvalue, 什么是xvalue, 什么是prvalue, 什么是… 一直搞得我晕头转向的, 今天下定决心一定要把它搞定, 写了一个程序来判断lvalue ...
- oc-30-堆栈
/** 操作引用计数器的方式:每个对象内部(对象的堆内存里面)都有一个引用计数器变量,表示对象被引用的次数. 1:retainCount:获得对象的引用计数器的值 2:retain:能够让对象的计数器 ...
- C#.NET使用AnimateWindow制作淡入淡出特殊效果的窗体
使用AnimateWindow制作淡入淡出效果的窗体 命名空间: using System.Runtime.InteropServices; API函数: [DllImport("user3 ...
- C. Om Nom and Candies 巧妙优化枚举,将复杂度控制在10e6
C. Om Nom and Candies 无线超大背包问题 #include <iostream> #include <cstdio> #include <cstrin ...
- Cows
Farmer John's cows have discovered that the clover growing along the ridge of the hill (which we can ...
- 将Winform程序快速转换为在浏览器中运行的程序
http://www.codeproject.com/Articles/31429/Embedding-a-NET-WinForms-Application-in-an-Interne 详见以上文章. ...