Split AngularJS code into templates