[FE] Angular 1 legacy: How to obtain the binding 'controller' from the element ?

We can use angular.element($0).controller('someDirective') to accomplish this, refer to the API: https://docs.angularjs.org/api/ng/function/angular.element.

The angular.element($0) will expose the wrapped object by angular on the element, you can also get the "scope" or "isolateScope" of the element.

H2
H3
H4
3 columns
2 columns
1 column
Join the conversation now