BootstrapDialog和angularJS包括html

时间:2015-09-09 11:34:19

标签: angularjs bootstrap-dialog

我正在使用https://github.com/nakupanda/bootstrap3-dialog在我的网络应用上显示对话框。

$scope.importFileWithSettings = function(){
                BootstrapDialog.show({
                        type: BootstrapDialog.TYPE_INFO,
                        message: "<div ng-include=\"'importform.html'\"></div>",
                        title: 'Title',
                });
            }; 

importform.html位于同一目录中。当对话框显示它没有显示importform.html内容时。怎么做对(我对angularJS和bootsrap比较新)?

1 个答案:

答案 0 :(得分:0)

根据文件,这应该有效:

$scope.importFileWithSettings = function(){
    BootstrapDialog.show({
            type: BootstrapDialog.TYPE_INFO,
            message: "$('<div></div>').load('importform.html')",
            title: 'Title',
    });
};