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

Add dependency into app.js when you create new module #1

Open
gianarb opened this issue Dec 31, 2014 · 2 comments
Open

Add dependency into app.js when you create new module #1

gianarb opened this issue Dec 31, 2014 · 2 comments
Milestone

Comments

@gianarb
Copy link
Contributor

gianarb commented Dec 31, 2014

Write a function into util.js to add dependency in app.js when you create new module

angular.module(
        'appname',
        [
            'templates-common',
            'ui.router',
            'ngCookies',
            'cr-session',
            //Add dependencies
            'cr-auth',
            'templates-app'
        ]
)
@gianarb gianarb self-assigned this Dec 31, 2014
@gianarb gianarb added this to the 0.0.1 milestone Dec 31, 2014
@prolic
Copy link

prolic commented Jan 19, 2015

Sorry, I don't know what you want to achieve. But I think you should use something like require js or dojo's require functionilty to lazy load dependencies. In your app config you should only specify common deps and the deps required to run app.init() or something like that.

@gianarb
Copy link
Contributor Author

gianarb commented Jan 20, 2015

Hi @prolic! :)

yo ng:module name-module

This command create a new module

  • src/app/name-module/name-module.js
  • ...
    But to load it in my app I can add your name into the list.. I would automate it

@gianarb gianarb removed their assignment Aug 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants