I have AngularJS + RequireJS app. My task is to create a backendless version for UI development purposes. So a version where some/all HTTP requested are mocked. The desired user flow is:
- User goes to /debug to initialise a backendless version.
- User can use the app with HTTP requests being mocked.
I'm trying to use ngMockE2E.$httpBackend. But I can't find any information on how to inject it into already bootstrapped app. Following most of googled examples I'm trying to create a new module and bootstrap that one:
(function(ng, mod, _, $, undefined){
'use strict';
mod.run(function($httpBackend) {
})
}(angular, angular.module('rexBackendless', ['rex', 'ngMockE2E']), _, jQuery));
angular.bootstrap(document, ["rexBackendless"]);
But this gives me "Error: ng:btstrpd App Already Bootstrapped with this Element". Any ideas on how to develop this task?