Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

141
Views
¿Cómo soluciono "TypeError no detectado: no se puede acceder a la propiedad" whenGET ", $ httpBackend no está definido"?

Estoy tratando de usar el siguiente https://embed.plnkr.co/plunk/pWNOdA en un proyecto que usa estricto-DI.

En app-mockbackend.js puede ver la siguiente configuración:

 angular.module('app').run(function($httpBackend, ServerDataModel) { $httpBackend.whenGET('/games').respond(function(method, url, data) { var games = ServerDataModel.findAll(); return [200, games, {}]; }); }]);

Cuando ejecuta la aplicación sin estricto, funciona bien, pero cuando agrega ng-strict-di a su aplicación, obtengo:

TypeError no detectado: no se puede acceder a la propiedad "whenGET", $httpBackend no está definido

He leído los documentos y con otras áreas, he tenido que anotar servicios mientras usaba estricto y los errores han disminuido y es genial, simplemente parece que no puedo resolver esto.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Oye, Dale, ¿intentaste anotar la función?

https://docs.angularjs.org/guide/di#dependency-annotation

Por ejemplo:

someModule.controller('MyController', ['$scope', 'saludador', function($alcance, saludador) { // ... }]);

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!