简体   繁体   English

Angular js和bootstrap模态选择框

[英]Angular js and bootstrap modal select box

Hey i'm trying updating a modal select box using angular and bootstrap modals 嘿,我正在尝试使用角度和自举模态更新模态选择框

When i click the button i can't get it to update the related select box value in bootstrap modal. 当我单击按钮时,我无法在bootstrap模式中更新相关的选择框值。

i tryed like this but it doesn't works. 我试过这样但它不起作用。

http://plnkr.co/edit/EaQhEGMTLx4omK5nxWHD?p=preview http://plnkr.co/edit/EaQhEGMTLx4omK5nxWHD?p=preview

Basically: if you click "Artist" button it should open modal and select the right select option 基本上:如果你点击“艺术家”按钮,它应该打开模态并选择正确的选择选项

Any clue ? 任何线索?

Try moving <div id="app" ng-view></div> to inside your main div to create correct parent-child relationship so that your modal's scope could inherit from your AuthCtrl ' scope: 尝试将<div id="app" ng-view></div>到主div中,以创建正确的父子关系,以便模态的范围可以从您的AuthCtrl范围继承:

<div ng-controller="AuthCtrl">
    <div ng-include="'modal.html'"></div>
    <div id="app" ng-view>
    </div>
  </div>

DEMO DEMO

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM