-
Randall Leeds authored
Angular is smart enough to not instantiate the application until all pending scripts have been loaded. That means that we can load optional components by simply appending the script tags. We already load the account component after the app component. By having the account component attach its controllers and configuration functions to the existing 'h' module, rather than defining a new angular module, the app can avoid having a dependency on 'h.account'. This removes the requirement that integrators define this module. Instead, they can just attach a configuration function to the main module if they need to configure the identity provider. I have a mild preference for this pattern, since strictly speaking no account module needs to be present. With a little morke tweaking, the interface could be made to not have a sign in link and operate in an anonymous mode by default, assuming that the server requires no authorization to annotate.
11e809f7
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
account-controller.coffee | ||
account.coffee | ||
auth-controller.coffee |