In the AngularJS docs, for $compile
it states:
Compiles an HTML string or DOM into a template and produces a template function, which can then be used to link scope and the template together.
https://docs.angularjs.org/api/ng/service/$compile
I still can't figure out WHEN you would use this. The docs tell you the details on all the API methods and properties but fails to clearly indicate why and when you'd want to use this.