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

angular.module的参数里面是否需要依赖项 #30

Open
lixuejiang opened this issue Nov 17, 2014 · 1 comment
Open

angular.module的参数里面是否需要依赖项 #30

lixuejiang opened this issue Nov 17, 2014 · 1 comment

Comments

@lixuejiang
Copy link

我把showcase里面的代码单独拿出来放到我自己的页面里面,发现不能运行,需要给angular.module传入第二个参数如angular.module('ngShowcaseSelect',[]),而网站上写的是angular.module('ngShowcaseSelect'),不知道是我的angular的版本和网站的不一致,还是网站上的代码有误

@asnowwolf
Copy link
Member

带第二个参数的形式表示创建一个模块,不带的表示获取一个模块,后者不会自动创建。在这个项目中,创建项目是在独立的文件中,其他地方都是引用。

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

2 participants