module.view()
is a deliberately half-baked attempt at implementing a web components pattern in angular.
It began as a convenience wrapper on module.directive()
to avoid specifying the templateUrl
in a context where the templateUrl
is derivable from the name of the view.
It also allows views to be included via expression (see example below), which is useful for routing, modals, and other dynamic view inclusion.