3
Controllers are declared in the DOM via the ng-controller attribute. My question is: It is possible and robust / safe to define Controllers hierarchically in DOM in daughter tags ?
Example:
<div ng-controller="CtrlAbrangente">
<div ng-controller="CtrlNoDIVFilhoDeAbrangente">
Fazer algo que usa o escopo do CtrlAbrangente e/ou do CtrlNoDIVFilhoDeAbrangente.
</div>
</div>
I see this need in cases where functionality on one page can be reused on others (more Comprehensive).
Yes, it’s possible and safe.
– Beterraba