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

third party component dependency injection issue #16

Open
ChiragHindocha opened this issue May 9, 2017 · 2 comments
Open

third party component dependency injection issue #16

ChiragHindocha opened this issue May 9, 2017 · 2 comments

Comments

@ChiragHindocha
Copy link

ChiragHindocha commented May 9, 2017

Hi @newaeonweb ,

I would like to know how can I inject 3rd party dependencies into my app? For eg. let's say I am using https://github.com/daniel-nagy/md-data-table
Now if I inject the dependency 'md.data.table' in my app.js, and if I create a new module by yo angm:angm-module, the 3rd party dependency 'md.data.table' that I injected previously is removed. I noticed the src code updateAppFile function, it gets the modules from the config & when I add a 3rd party bower component, it is niether added in the .yo-rc.json file nor does it exists in the _app.js file & hence I understand why the dependency gets removed when I add a new module.

So is app.js the wrong place to inject 3rd party dependencies ? What's the correct approach ?

I guess there should be an object array named dependencies in the .yo-rc.json which should be updated when I add/remove a bower component into my app & when app.js gets overwritten it should consider _app.js + modules (in .yo-rc.json file) + dependencies (in .yo-rc.json file)
Do I need to change the source file to support this or is there some another approach to achieve this?

Please advice. Thanks in advance.

@ChiragHindocha ChiragHindocha changed the title third party component dependency issue third party component dependency injection issue May 9, 2017
@ChiragHindocha
Copy link
Author

Or I can even create a module say vendor & inject all 3rd party dependecies into vendor module & injecting vendor in app.js should solve my purpose. Please advice.

@newaeonweb
Copy link
Owner

@ChiragHindocha . sorry for delay. For now you need to add the dependencies manually to both files.

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