No, it's not the right way. Do not do any DOM modifications inside the controller, ever.
There are no exceptions on that. It's just bad practise.
What you want to do is use directives.
Here is the link to help you get started: http://docs.angularjs.org/guide/directive