【Angular】"Module '{0}' has no exported member '{1}'.": "模块“{0}”没有导出的成员“{1}”。",
来源:互联网 发布:二手交易软件有什么 编辑:程序博客网 时间:2024/06/05 18:23
一、问题描述
Module ‘**’ has no exported member
[15:37:06] typescript: **leave/list/leave.module.ts, line: 4 Module '**/leave/leave.service' has no exported member 'LeaveService'. L3: import { IonicPageModule } from 'ionic-angular'; L4: import {LeaveService} from '../leave.service'; L5: @NgModule({[15:37:06] typescript: **/leave/list/leave.ts, line: 3 Module '**/leave/leave.service' has no exported member 'LeaveService'. L2: import {Component} from "@angular/core"; L3: import {LeaveService} from '../leave.service'; L4: @IonicPage()
出现这种问题,说没有导出成员,但是这里
import { NgModule } from '@angular/core';import { LeavePage } from './bumf';import { IonicPageModule } from 'ionic-angular';import {LeaveService} from '../leave.service';@NgModule({ declarations: [LeavePage], imports: [IonicPageModule.forChild(LeavePage)], providers: [LeaveService]})export class LeavePageModule { }
这里,我按住Ctrl键,鼠标左键点击module里面的Leave.service应该是能直接跳转到对应的service才对,但是这里跳不过去;
这里,我明明是根据提示来写的,但是导入的不对:
这是为什么呢?【../】表示已经跳出list文件夹,到达leave文件夹目录下了,但是还是拿不到那个leave.service.ts;
问题在于:
和
都没有大写!!!犯了低级错误了。。。。
二、总结
查找module中的导入文件的位置和大小!附 Angular2报错表
欢迎大家关注我的微信公众号~【幕桥社区】
阅读全文
0 0
- 【Angular】"Module '{0}' has no exported member '{1}'.": "模块“{0}”没有导出的成员“{1}”。",
- CentOS7配置opencv for python (解决问题:[no-member] Module 'cv2' has no 'VideoWriter' member)
- 移植2.6.31遇到的问题(1):'struct uart_info' has no member named 'tty'
- 在配置primeng环境时遇到Error TS2304: Cannot find name 'Map'或has no exported member 'DomSanitizer'
- 最愚蠢的错误,没有之一!module 're' has no attribute 'findall'
- pygame安装问题(1) 'module' object has no attribute 'init'
- pygame安装问题(1) 'module' object has no attribute 'init'
- service_identity 模块 AttributeError: 'module' object has no attribute 'Any'
- error: 'struct proc_dir_entry' has no member named 'owner'的解决方法
- error: 'struct proc_dir_entry' has no member named 'owner'的解决方法
- GNU Radio自定义模块在添加到流图后运行报‘module’ object has no attribute错误的解决方法
- AttributeError: module 'requests' has no attribute 'get'”,python中”requests模块“get”属性缺失“的错误该如何解决?
- 'class QApplication' has no member named 'setMainWidget'
- truct in6_addr has no member named in6_u
- AttributeError: 'module' object has no attribute 的解决方法
- AttributeError: 'module' object has no attribute 的解决方法
- AttributeError: 'module' object has no attribute 的解决方法
- AttributeError: 'module' object has no attribute 的解决方法
- 文件操作File和RandomAccessFile
- 习题6.4
- Android7.0适配 调用系统相机闪退
- 数字 转换成 人民币表达方式例如(1111)转成 “一千一百一拾一元整”
- spring部分注解
- 【Angular】"Module '{0}' has no exported member '{1}'.": "模块“{0}”没有导出的成员“{1}”。",
- 读《代码整洁之道》
- 腐蚀与膨胀对偶验证
- NYOJ A : 和的问题
- 好用的文件读入
- linux服务器安装python3
- TCP/IP详解卷1:协议(三)【IP:网际协议】
- python学习笔记(十六)——字典+collections模块的其他数据结构
- 关于python3.x版本 urllib修改过后遇到的几个问题