angular-recursion icon indicating copy to clipboard operation
angular-recursion copied to clipboard

Extra dom elements created

Open gitsome opened this issue 9 years ago • 1 comments

Here is the example: http://jsfiddle.net/HB7LU/7721/

And screenshot: screen shot 2014-10-28 at 9 25 12 am

The template within the recursive directive (gt-view) looks like this:

template: [
     '<div class="contents">',
          '<div class="gt-view-content">',
              '<h1>{{view.title}}</h1>',
          '</div>',
          '<div class="gt-view-child-container" ng-if="view.childView">',
              '<gt-view view="view.childView"></gt-view>',
          '</div>',
      '</div>',
].join('')

So regardless if childView is populated in the model, I am getting another gt-view rendered Ideas?

gitsome avatar Oct 28 '14 16:10 gitsome

Your fiddle uses angular 1.0.1. It works better with a more up to date angular version, like 1.4.8..

grtjn avatar Sep 05 '16 09:09 grtjn