compile angularjs templates