Scope issues with Angular UI modal

后端 未结 5 614
萌比男神i
萌比男神i 2020-12-02 06:25

I\'m having trouble understanding/using the scopes for an angular UI modal.

While not immediately apparent here, I have the modules and everything set up correctly

5条回答
  •  一个人的身影
    2020-12-02 06:53

    Update Nov 2014:

    Actually your code should work after upgrading to ui-bootstrap 0.12.0. Transcluded scope is merged with controller's scope so no more need for $parent or form. stuff.

    Before 0.12.0:

    The modal uses transclusion to insert its contents. Thanks to ngForm you can control the scope by name attribute. So to escape transcluded scope just modify the form this way:

    or

    
    

    The model data will be available in controller scope.

提交回复
热议问题