Chciałbym z poziomu konstruktora w serwisie skorzystać ze $scope, $http etc.Projekt jest w ng.1.5 ale pisany komponentowo w ES6, kompilacja w webpack2. Wstrzykiwanie przez ngInject. Prosze o sugestie. Gdy pobieram przykładowo this.$http to dostaje undefined
export default class AuthenticationService {
constructor(
$rootScope,
$http,
$state,
$scope,
$timeout,
$location
) {
'ngInject';
this.$http = $http;
console.log( this.$http);
} {
}
Poniżej screen po kompilacji:
- screenshot-20170310192650.png (68 KB) - ściągnięć: 435