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

[article] adds ng-cli-to-npm #60

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

rxjs-space
Copy link
Contributor

No description provided.

```ts
// `another-project\src\app\app.module.ts
import { TlUiModule } from 'tl-ui/src/app/tl-ui/tl-ui.module';
@ngModule({imports: [TlUiModule]})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NgModule 应该要大写的。。O.O

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

- 本文所述方法是笔者通过试错摸索出来的,过程中大量参考了 [@ng-bootstrap/ng-bootstrap][]。
- 试错固然啰嗦,需要干货的同学请移步“总结”部分。
- 本文在测试安装本地 package 的过程中,没有使用 `npm link` -- 笔者试验多次均以 Error 告终。
- 阅读本文,需要读者简单了解一下知识点:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

“以”下知识点:

- `ng g module awesome-module`
- 为了标签前缀,稍微修改 `angular-cli.json` 和 `tslint.json`
- 完成 awesome-module 的开发(template 和 styles 直接写在 component 里)
- 根目录新建 `index.ts`,并 re-export `awesoe-module`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants