Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问5.0.2版本现在支持Angular6么? #103

Closed
wangtao opened this issue May 21, 2018 · 1 comment
Closed

请问5.0.2版本现在支持Angular6么? #103

wangtao opened this issue May 21, 2018 · 1 comment
Labels

Comments

@wangtao
Copy link

wangtao commented May 21, 2018

============

之前用的Angular 5.2 和 ngx-weui 3.0.0, 正常使用

手贱升级了Angular 6.0.2, 然后更新ngx-weui到5.0.2, 发现不能正常用了

import报错

import { SkinType, InputType } from 'ngx-weui';
import { DialogService, DialogConfig, DialogComponent } from 'ngx-weui/dialog';

这么写会导致下面错误 :

TS2305: Module '"C:/Development/projects/Angular/zytax-wx-test/node_modules/ngx-weui/weui"' has no exported member 'SkinType'
TS2307: Cannot find module 'ngx-weui/dialog'

WebStorm自动完成会改成下面方式:

import {DialogService} from 'ngx-weui/src/dialog/dialog.service';
import {DialogConfig} from 'ngx-weui/src/dialog/dialog.config';
import {ActionSheetConfig} from 'ngx-weui/src/actionsheet/actionsheet.config';
import {ActionSheetService} from 'ngx-weui/src/actionsheet/actionsheet.service';

编译没错了,然而, 启动服务器会报:

Module not found: Error: Can't resolve 'ngx-weui/src/actionsheet/actionsheet.service' in .....

之类

============

Bug Report or Feature Request (mark with an x)


[ ] Bug report -> please search issues before submitting
[x] Feature request
[ ] Documentation issue or request

Current behavior

Expected behavior

Environment


Angular version: 6.0.2
ngx-weui version: 5.0.2
Browser:
- [ ] Chrome (desktop) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] IE version XX

Others:
@cipchk
Copy link
Owner

cipchk commented May 21, 2018

5.2.0 不支持 ngx-weui/dialog 这类用法,所有都采用 ngx-weui。目前的 Tree Shaking 已经足够智能,没有必要按模块导入这类蹩脚的方式。

@cipchk cipchk added the bug label May 21, 2018
@cipchk cipchk closed this as completed in 17ea510 May 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants