akserg/angular.dart.ui

Successive modal component not being injected

Opened this issue · 1 comments

This issue is also posted on Stack Overflow

I am working with the AngularDart UI modal component, and I am trying to implement successive modals. Ask the user a question, get an answer, ask the user another question, etc. The problem I'm having is that for the second modal, the component is not being compiled and injected.

I have confirmed that the template selector is being injected on modal open:

<modal-window preventanimation="false" backdrop="true" keyboard="true" windowclass="modal-editor" size="sm"
          class="ng-binding" index="0">
<open-question-modal
        question="There is only one version of this app.  You will need to create a copy for editing.  Please select the copy type."
        answer-list-string="['Complete Copy','Data Sources Only']" cancel-enabled="false"
        class="ng-binding"></open-question-modal>

But then the compiled component doesn't get injected:

<modal-window preventanimation="false" backdrop="true" keyboard="true" windowclass="modal-editor" size="sm"
          class="ng-binding" index="0">
<div tabindex="-1" class ng-style ng-click="close($event)" modal-window>
    <div class modal-window>
        <div class="modal-content" modal-window>
            <content modal-window class="ng-binding"></content>
        </div>
    </div>
</div>

I confirmed that the component is being called because I can debug the 'attach' method. I made sure the previous modal was closed (Modal.openedWindows was empty prior to the second modal being called). My uninformed gut thinks it has something to do with scope, but I don't know enough about scope to say what. I am injecting ScopeAware as I normally would and passing it into modal.open.

Has anyone else experienced something like this? I can post or describe more of my code based on specific questions. Thank you.

I'm busy fixing other issues by request of @stevenpietzsch for 0.6 release. I will have a look into you problem a bit later.