Javascript 在控制器中调用ng模式时出现问题
以下是我采取的步骤: 1我从以下位置下载了脚本文件: 2包括在我的网页和我的申请中:Javascript 在控制器中调用ng模式时出现问题,javascript,angularjs,Javascript,Angularjs,以下是我采取的步骤: 1我从以下位置下载了脚本文件: 2包括在我的网页和我的申请中: var summariesApp = angular.module('summariesApp', ['ui.bootstrap', 'ngCkeditor', 'dcModal']); 3试图在控制器中使用它: summariesApp.controller("singleSNPController", function ($scope, $http) { $scope.stopLightModa
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注入控制器的 尝试将dialogService注入控制器,如下所示:
summariesApp.controller("singleSNPController", function ($scope, $http, dialogService) {
$scope.stopLightModal = dialogService.create('../Templates/test.html');
看看这个例子,您将看到他们是如何将dialogService注入控制器的 我以前用过这个。它工作非常好,并且有很好的文档记录:
我以前用过这个。它工作非常好,并且有很好的文档记录: