I have an Angular app. I created in my app a combo box which operate fine. I can choose from my dependent list -> dependedQuestions.
<div class="dependedQuestion customizedSelect">
<select class="T14" ng-model="selectedQuestion.selectedDependedQuestion" ng-options="question.number for question in dependedQuestions"></select>
</div>
I created an external file called popup.js. In this file i call for dialog of jquery ui.
the function :
function dialogWithTwoButtonsComboboxAndTextbox(message,title,callbackOnOK, callbackOnCancel){
var htmlString = "<div id=\"modalConfirm\" title=\""+title+"\">" +
"<div class=\"questionnaireAttributesBlockDialog\">" +
"<div class=\"questionInformation\">" +
"<div class=\"dependencyInstruction questionnaireLabels bold oronCondMFMediumA\"> dependencies</div>" +
"<div class=\"chooseDependedQuestion\">"+
"<div class=\"dependencyQuestionLabel marginLeft1 oronCondMFMediumA fontSize16Px\">שאלה:</div>"+
"<div class=\"dependedQuestion customizedSelect\">"+
"<select class=\"dependedQuestionCombobox fontSize16 oronCondMFMediumA T14\" name=\"typeValidation\" ng-model=\"selectedQuestion.selectedDependedQuestion\" ng-options=\"question.number for question in dependedQuestions\" ng-blur=\"createDependencyOnlyIfTextboxFilled()\"></select>" +
"</div>" +
"<div class=\"chooseDependedQuestion\">"+
"<div class=\"dependencyQuestionLabel oronCondMFMediumA fontSize16Px\">answer</div>"+
"<input type=\"text\" id=\"optionalValuesForAnswer\" ng-model=\"selectedQuestion.optionalValuesForDependedQuestion\"/>" +
"</div>" +
"</div>" +
"</div>" +
"</div>" +
"</div>" +
"</div>";
defineDialogPopUp(htmlString, message,title, callbackOnOK, callbackOnCancel);
}
the function defineDialogPopUp :
function defineDialogPopUp(htmlString,message,title, callbackOnOK, callbackOnCancel){
var dialogButtons = {};
var approveButtonText = messageToUser.dialogOkButton;
var cancelButtonText = messageToUser.dialogCancelButton;
dialogButtons[cancelButtonText] = { text: cancelButtonText,
class:'btnCancel btnDialog',
click:function() {
if (callbackOnCancel != null)
callbackOnCancel();
$(this).dialog( "destroy" );
}
}
dialogButtons[approveButtonText] = { text: approveButtonText,
class:'btnApprove btnDialog',
click:function() {
callbackOnOK();
$(this).dialog("destroy");
}
};
$(htmlString).dialog({
height: 300,
width: 500,
modal: true,
resizable: false,
buttons:dialogButtons
});
}
The problem is that it shown but the combo box doesn't work. I think because it is not in angular? What can i do about it? I remind you that i need to open a dialog to user.
Try to use Angular UI rather than using jquery Ui . http://angular-ui.github.io/
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.