i am using angularjs 1.65 version and its seems that $sce is getting me undefined i have been trying serval times to get it fixed over 3 hours on it.
here is the module :
var app = angular.module('myApp', ['ui.router','ngclipboard','oitozero.ngSweetAlert']);
app.config(function ($stateProvider, $urlRouterProvider, $locationProvider) {})
and here is the controller :
app.controller('monitormainController',
['$rootScope','$scope','$timeout','SweetAlert','$sce', function
($scope,$timeout,$rootScope,$watch,SweetAlert,$sce) {
$scope.copyset = function(name){ $scope.trustedHtml =
$sce.trustAsHtml(name); };
});
i am getting an error which says $sce is undefined
Failed to load resource: the server responded with a status of 404 (File not found) angular.js:14642 TypeError: Cannot read property 'trustAsHtml' of undefined at Scope.$scope.copyset (monitormainController.js:93) at fn (eval at compile (angular.js:15500), :4:153) at callback (angular.js:27285) at Scope.$eval (angular.js:18372) at Scope.$apply (angular.js:18472) at HTMLButtonElement. (angular.js:27290) at HTMLButtonElement.dispatch (jquery.js:5095) at HTMLButtonElement.elemData.handle (jquery.js:4766)
will be happy to get any answer thank you very much!