[英]External file in angular js
I have an Angular app. 我有一个Angular应用程序。 I created in my app a combo box which operate fine.
我在应用程序中创建了一个可以正常运行的组合框。 I can choose from my dependent list -> dependedQuestions.
我可以从我的依存列表中选择-> 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. 我创建了一个名为popup.js的外部文件。 In this file i call for dialog of jquery ui.
在这个文件中,我要求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 : 函数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 . 尝试使用Angular UI而不是jquery Ui。 http://angular-ui.github.io/
http://angular-ui.github.io/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.