Using $scope into a service
问题 What I expect from below code is it would bind $scope.as . But nothing is displaying and no error is shown in console var testModule = angular.module('testmodule', []) .controller('ctrl', function ($scope, mser) { mser.aa(); }) .service('mser', function($scope /* Would $scope be here */) { this.aa = function(){ $scope.as = "hello mars" }}); 回答1: you can't use $scope in service you should use it in your controller it is used to glue controller and DOM. Since services are injected in