It is important not to hide composition. It should be done centrally, at the root of the application.
In angular there are 2 different resources we must compose in order to build an application
-
Using a composition root we map
directives
,controllers
, andservices
into theinjector
. -
Using routing we compose views from HTML
partials
andcontrollers
for each different application state.