在控制器中调用ng模态时出现问题
trouble with ng-modal while calling it in controller
以下是我采取的步骤:
1) 我从以下位置下载了脚本文件:https://github.com/doodeec/dcom-angular-dialog
2) 包含在我的网页和应用程序中:
var summariesApp = angular.module('summariesApp', ['ui.bootstrap', 'ngCkeditor', 'dcModal']);
3) 尝试在控制器中使用它:
summariesApp.controller("singleSNPController", function ($scope, $http) {
$scope.stopLightModal = dialogService.create('../Templates/test.html');
我收到一个错误,没有找到dialogService资源。我知道这个问题有点简单,但我已经被这个问题困扰了一段时间。提前谢谢。
尝试将dialogService注入控制器,如下所示:
summariesApp.controller("singleSNPController", function ($scope, $http, dialogService) {
$scope.stopLightModal = dialogService.create('../Templates/test.html');
看看这里的例子,你会看到他们是如何将dialogService注入控制器的。
我以前也用过这个。它运行得非常好,并且有很好的记录:
https://github.com/likeastore/ngDialog
相关文章:
- 在将缩略图链接到模态时遇到问题
- 从谷歌地图自定义控件打开离子模态时遇到问题
- Jquery 关闭模态问题
- 模态对话框与指令在角度,范围问题
- 华丽的弹出模态问题“获取内联”
- 模态中模态的关闭问题 - 引导
- AngularJS Bootstrap UI,将数据传递到模态的问题.已选择卡未定义
- 模态弹出问题
- 使用模态时出现问题
- 引导模态元素的高度问题
- 铬CEF显示模态对话问题
- 这个模态有什么问题.
- Angular UI 模态的范围问题
- 在控制器中调用ng模态时出现问题
- jQuery图像调整大小以适应模态的问题
- 关闭模态问题
- 在第一个模态中打开另一个模态时,启动模态问题
- 使用Angular引导模态多重问题
- JQuery / JavaScript线程问题-模态对话框
- Bootstrap:使用模态显示动态数据时出现问题