0

I have 2 directives within a module. Within one of them, is a templateUrl property. Within that templateUrl, I've made a reference to the other directive, which in turn has a templateUrl.

e.g.

<div>    <!--This is my first partial page which uses the SelectorResult directive -->
  Here are some results
  <div result-carousel>
     <!-- here is where some more html should go from result-carousel -->
  </div>
</div>

From the module with the directives:

app.directive('SelectorResult', function () {
        return {
            restrict: 'AE',
            scope: {},
            templateUrl: '/chooser/Pages/partials/selector-result-tmpl.aspx',
            replace: true,
            controller: 'SelectorResultController',
            controllerAs: 'resultCtrl'
        };
    });

app.directive('resultCarousel', function () {
        return {
            templateUrl: '/chooser/Pages/partials/carousel-tmpl.html'
        };
    });

This is the error I'm getting: [ngTransclude:orphan] http://errors.angularjs.org/1.2.28/ngTransclude/orphan?p0=%3Cdivlass%3D%carousel-inner%22%20ng-transclude%3D%22%22%3E

I get an error about transclusion, and I've tried some things, but no change. I thought you folks might have ideas.

spuppett
  • 547
  • 10
  • 26
  • Can you share the error please? – ajmajmajma Oct 08 '15 at 14:04
  • It's a bit confusing what the html shown represents ... is that inside the first template? Try adding comments about what html exists where. – charlietfl Oct 08 '15 at 14:07
  • The error indicates that you are using `ng-transclude` in one of the templates, but neither directive has a `transclude: true` property. – New Dev Oct 08 '15 at 14:31
  • Would it be more appropriate for one to have it over the other? I just saw that in the carousel-tmpl, there is a div with ng-tranclude attached to it. – spuppett Oct 08 '15 at 14:32

0 Answers0