- Architecting Angular Applications with Redux,RxJS,and NgRx
- Christoffer Noring
- 105字
- 2021-08-27 19:56:14
Consuming a module
In ES2015, we use the import and from keywords to import one or several constructs like so:
import { SomeConstruct } from './module';
The imported file looks like this:
export let SomeConstruct = 5;
The basic operations involved, working with ES2015 modules, can be summarized as follows:
- Define a module and write the business logic of the module
- Export the constructs you want to make public
- Consume said module with an import keyword from a consumer file
Of course there is a bit more to it than that, so let's look at what else you can do in the next subsection.
推薦閱讀
- EJB 3.1從入門到精通
- 通信網絡基礎與設備
- Mastering Machine Learning for Penetration Testing
- 從區塊鏈到Web3:構建未來互聯網生態
- INSTANT PhpStorm Starter
- Django 2 by Example
- TCP/IP入門經典(第5版)
- 物聯網概論(第2版)
- NB-IoT物聯網技術解析與案例詳解
- Microsoft Dynamics CRM 2011 Applications(MB2-868) Certification Guide
- 網絡基礎與網絡管理項目化教程
- 端到端QoS網絡設計
- 6G無線網絡空口關鍵技術
- 一本書讀懂物聯網
- 精通SEO:100%網站流量提升密碼