filter $scope Error: Unknown provider: $scopeProvider <- $scope <- transformSensorStatusFilter

后端 未结 2 1759
走了就别回头了
走了就别回头了 2021-02-18 22:32
marsApp.filter(\"transformSensorStatus\", function($scope) {
    return function(input, options) {

    var sensorReading = ( input ? ( input / 1000) : 0);
    var senso         


        
2条回答
  •  后悔当初
    2021-02-18 22:54

    The $scope is available only for controllers and the link function of directives. This is why the filter cannot find it. Maybe you meant $rootScope?

提交回复
热议问题