0

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.

i tryed like this but it doesn't works.

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 ?

1 Answer 1

2

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 ng-controller="AuthCtrl">
    <div ng-include="'modal.html'"></div>
    <div id="app" ng-view>
    </div>
  </div>

DEMO

Sign up to request clarification or add additional context in comments.

2 Comments

it works perfectly man thanks, BUT anyway to make it cleaner? without including ng-view in the AuthController ?
@sbaaaang: You're using routeProvider, so using ng-view is a must

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.