update to angular 1.0.2 - switch to template function