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

angm-directive and external assets folder #13

Open
luisnomad opened this issue Dec 13, 2016 · 1 comment
Open

angm-directive and external assets folder #13

luisnomad opened this issue Dec 13, 2016 · 1 comment

Comments

@luisnomad
Copy link

Hi!

First of all, thank you for this generator, it's pure awesomeness. I have learnt a lot about angular using it.

I have a question regarding directives and the assets folder. It's great that I can put all the assets needed for a directive within its own folder, because it's easier to maintain and distribute. But I have no idea how to get the URL for those assets.

I have a directive folder, with a controller, template and test, plus the assets folder. I have a big SVG file that goes with mu directive (basically the whole directive depends on that SVG). I was wondering how to embed it, what the URL to the SVG would be. And in case I add CSS/JS to the directive, how could I include it in the page when the directive is used?

What would happen if I have several instances of the directive? (not planning to, but I am curious).

Thanks!!!

@newaeonweb
Copy link
Owner

Hi @luisnomad , if you planning to use a directive in others modules/ pages will be great if you create it on shared folder instead of inside a specific module. So this way the directive will be available to the entire application. The path will be the folder path. I'm sorry for my delay.

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