I'm building a fairly complex AngularJS application. It needs to have the ability to easily incorporate new functionality on a per user basis. For example say that the application is completed and 6 months later I need to add functionality for a modal in a user's settings. This button should only be available to those users. A month later more functionality is required etc. etc.
I was wondering what the best way to do this would be.
I plan on trying to manually bootstrap angular. New functionality would be in standalone modules that get dynamically loaded. There will be a login screen that is similar for every user. After logging in there would be an api call to get the angular modules for that user which will then be bootstrapped and angular loaded up.
Another option I was looking to into was using the $inject
service but that would require to have all the modules bootstrapped into the main app to begin with. And with a potentially unlimited number of modules that doesn't seem very feasible.
Any advice would be much appreciated!
Decouple everything! Keep code open to extension and closed to modification.