Adding closures to templates

I added closures to all templates inspired by theses [recommandations](https://github.com/johnpapa/angularjs-styleguide).