我的html内容保存在一个公共页面中。因此我只能在这里调用这些功能。我无法直接在html中禁用该按钮。我需要在js文件中禁用它。这是一个有角度的页面。有人可以帮忙吗?
这是我的代码
HTML:
<button core-login-check item-click="button.click($event)" data-ng-if="button.type == 'button' && !button.skipSessionCheck" data-ng-disabled="!!button.disableOnInvalid && form.$invalid || button.disable && button.disable() || !!button.disableNotOnDirty && !form.$dirty" class="btn btn-info" data-i18n-content="button.label | call" data-ng-attr-qa-name="button-{{button.name}}" class="btn btn-info"></button>
JS:
formButtonSet.addButton('save', ['save', function(save) {
return {
type: 'button',
click: save,
label: {
bundle: 'documents',
key: 'modal/form/button/save'
},
disableOnInvalid: true
};
}]);
var CreateDocumentFolderCtrl = function($scope, $modalInstance, customizationService,
widgetsNotificationService, coreLoginService, documentService, parentDocFolderId) {
var createDocumentFolderForm = {};
createDocumentFolderForm.data = {
parentDocFolderId: parentDocFolderId
};
createDocumentFolderForm.save = function() {
documentService.doRestCall(documentService.createDocumentFolderReqInfo(createDocumentFolderForm.data)).then(
coreLoginService.loginCheckLambda(function(result) {
if (result !== undefined) {
documentService.setOperationInfo('documentfolder-create', result);
widgetsNotificationService.addSuccessNotification('documents', 'notifications/folderCreated', {
documentFolder: result.title,
linkPath: 'documents/list/' + result.path
}, 0);
}
$modalInstance.close();
}));
};