diff --git a/lib/main.js b/lib/main.js
index <HASH>..<HASH> 100644
--- a/lib/main.js
+++ b/lib/main.js
@@ -156,7 +156,7 @@ function makeJsonFriendlyRoute(injector, route) {
 
 function makeRunInContext(serverScripts, angularModules, prepContext, template) {
     return function (func) {
-        var context = angularcontext.Context();
+        var context = angularcontext.Context(template);
         context.runFiles(
             serverScripts,
             function (success, error) {
@@ -165,17 +165,23 @@ function makeRunInContext(serverScripts, angularModules, prepContext, template) 
                     func(undefined, error);
                 }
 
-                ngoverrides.registerModule(context);
                 prepContext(
                     context,
                     function () {
 
-                        var $injector = getInjector(context, angularModules, template);
+                        ngoverrides.registerModule(context);
+
+                        var angular = context.getAngular();
+
+                        var modules = angular.copy(angularModules);
+                        modules.unshift('angularjs-server');
+
+                        var $injector = context.bootstrap(modules);
 
                         // Although the called module will primarily use the injector, we
                         // also give it indirect access to the angular object so it can
                         // make use of Angular's "global" functions.
-                        $injector.angular = context.getAngular();
+                        $injector.angular = angular;
 
                         // The caller must call this when it's finished in order to free the context.
                         $injector.close = function () {
Bootstrap Angular completely when we prepare a context.

Previously we just did the injector initialization, but fully bootstrapping
allows the caller to assume its template has been parsed, and doesn't
really do any harm if the template is empty.