Add $ httpBackend and ngmocke2e as a dependency

I want to add $ httpBackend and ngmocke2e as a dependency, but inside the launch function

angular.module('myApp', [ 'myApp.Group', 'ngRoute'])
    .config(function ($routeProvider) {
        $routeProvider
            .when('/', {
                redirectTo: '/auth/login'
            });
    })
    .run(function ($rootScope, $window, $location, Environment) {

       if(localhost) {
         //add ngMockE2E and $httpBackend as dependency and call below function
         mockRoutes($httpBackend);
       }

    });
+4
source share

All Articles