Fix template to work with angular 1.0 and 1.2