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

小程序开发指南(四) #9

Open
gaowei1012 opened this issue Jul 23, 2017 · 0 comments
Open

小程序开发指南(四) #9

gaowei1012 opened this issue Jul 23, 2017 · 0 comments

Comments

@gaowei1012
Copy link
Owner

问:
什么是模块化?
模块化怎么用?
模块化的优势在哪里?

答:
模块化 (MVC)即 model view controller
我们讲一些公共的代码抽离出来,写在一个独立的js文件中,形成模块;
模块只有通过 module.exports 或 exports 才能对外暴露接口;
一般我们会用module.exports 对外暴露接口
小程序目前不支持 直接引入 node_modules 现在需要我们手动去添加node_modules支持文件;

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

No branches or pull requests

1 participant