 <p>You should use directives. In their definition, they have a link attribute which receives a function. This function is executed after the directive template is rendered in the DOM. So inside this function you can access any element inside the directive template.</p> <p>Remember: if you are going to do some DOM manipulation you should only execute it in the linker function of the directive that renders the DOM you're manipulating.</p> <p>You can learn more about creating custom directives in <a href="https://docs.angularjs.org/guide/directive" rel="nofollow">https://docs.angularjs.org/guide/directive</a></p>