javascript - TypeError: $location.path is not a function -
<span class="button-icon pull-left" ><i class="ti ti-plus" ng-click="itemopen()"></i></span>
this html code.
$scope.itemopen=function() { return $location.path('/consultationparametermaster'); };
this script. , error is. $location.path not function
you need inject $location in controller if going this. missing 'focus' parameter
app.controller('samplecontroller', ['$scope','$http','$location', function($scope,$http,$location) { $scope.itemopen=function() { return $location.path('/consultationparametermaster'); }; }
edit:
according comment,you need arrange dependencies,
coremodule.registercontroller('medicalrecordscontroller', ['$rootscope', '$scope', '$sessionstorage', 'restangular', '$element', '$thememodule', '$filter', '$uibmodal', 'gettext', 'focus', '$location', function ($rootscope, $scope, $sessionstorage, restangular, $element, $thememodule, $filter, $uibmodal, gettext,focus,$location)
Comments
Post a Comment