angularjs - Can't inject scope in service (angular 1.5 / es6) -


 const taskservicemodule = angular.module('taskservicemodule');  class taskservice {   constructor ($scope) {     console.log($scope)   } } taskservice.$inject = ['$scope']; taskservicemodule.service('tasksservice', taskservice); export default taskservicemodule;  const app = angular.module(`app`, [taskservicemodule.name]); 

i error, why? can explain?

error: [$injector:unpr] unknown provider: $scopeprovider <- $scope <- tasksservice


Comments

Popular posts from this blog

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -