simplified createViewTemplate, angularjs support