Recursive templating in AngularJS