0
Заявлен услугеService Access внутри контроллера
calculator_app.service('FullPath', function() {
this.full_path = function (pt, pg, prt, cd,scpe) {
-- some logic---
};});
ОБЪЯВЛЕННОЙ контроллер
calculator_app.controller("Opportunity_Controller", ['$scope', '$http', 'ngDialog', 'FullPath', 'FillOpportunity', function ($scope, FullPath, FillOpportunity, $http, ngDialog) {
$scope.find_path = function() {
$scope.result_path = FullPath.full_path($scope.res_pt, $scope.res_pg, $scope.res_prt, $scope.res_cd, $scope);
}]);
Линия FullPath.full_path бросает ошибку как FULLPATH не определена ....
Спасибо. Это решает. Однако я не могу получить доступ к ngDialog. ngDialog undefined wen Я сделал console.log $ scope.calculate_opportunity = function (ngDialog) { ngDialog.open ({template: '
I am Ng Dialog
I thik you Havent полностью изменить код, как это было предложено в ответ –