I an new to angular and was wandering about the following issue:
Suppose I want to provide some UI functionality, like a plugin, that uses angular and uses other angular modules on its own (like the https://github.com/angular-ui/ui-router for example).
I am trying to figure out what would be the minimal requirements (changes required) from the hosting HTML page to be able to use my new directive
(assuming a directive is the right way to wrap up such UI functionality.
So I know I will need to obviously include angular.js in the main html page,
and also need to add ng-app
to some element (that is an ancestor/container of the element with my new directive) at the HTML.
I will also need to include some JS in which I will implement the directive as part of my module.
If the page already has an ng-app that it creates inside it, then it can probably just add my module as a dependency of its existing App (module).
Now what happens if I want to use another module within my module?
Does it mean that the main HTML page needs to know it an include the JS with the "3rd party" or my own sub/helper module? or is there some what my own module would load the JS's its dependent on?
It is of course possible that I am not thinking of this properly... feel free to guide me...