javascript - modularity and re-usability in angularjs -


I'm new to angular and wandering about the following issue:

Suppose I Want to give UI functionality, such as a plugin that uses angular and uses other angular modules on its own (such as for example)

I am trying to figure out that the minimum requirements (necessary changes) to be able to use my new director to host HTML pages (such as The correct method of wrapping UI functionality is.

So I know that I explicitly have .js in angular main HTML page, and some elements on HTML (which is the predecessor of the element with my new instructions / Container) in the ng-app add I also include some JS, in which I will apply the instructions as part of my module.

If the page already has a ng-app that makes it inside So maybe it could add as the dependency of my module, its current app (module).

Now what happens if I want to use any other module inside my module?

Does this mean that The main HTML page needs to know that JS is included with "third party" or with its own sub / assistant module? Or is there something that is dependent on my own module JS loading?

It is definitely possible that I am thinking about this right ... I feel free to guide me ...

Does this mean that the main HTML page needs to know that JS is the "third party" or my own sub / assistant Module? Or is there something that is loading depending on your own module js?

yes and no

Yes, the "third party" library must should be included anywhere, but does not necessarily mean the HTML file In.

It can be included in your own html (for example, the Twitter Bootstrap library, if the user does not include jQuery, then throws an error) or it's your library (AJAX call, copy Can be wrapped through a paste-mined version, etc. More details).

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -