diff --git a/lib/application.dart b/lib/application.dart index 3773e4284..8c7414305 100644 --- a/lib/application.dart +++ b/lib/application.dart @@ -179,7 +179,7 @@ abstract class Application { publishToJavaScript(); return zone.run(() { var rootElements = [element]; - Injector injector = createInjector(); + injector = createInjector(); ExceptionHandler exceptionHandler = injector.getByKey(EXCEPTION_HANDLER_KEY); // Publish cache register interface injector.getByKey(JS_CACHE_REGISTER_KEY); diff --git a/test/bootstrap_spec.dart b/test/bootstrap_spec.dart index fd6b147b8..b59bba34d 100644 --- a/test/bootstrap_spec.dart +++ b/test/bootstrap_spec.dart @@ -30,5 +30,15 @@ void main() { applicationFactory()..selector('div[ng-bind]')..run(); expect(body.text).toEqual('{{ignor me}}works'); }); + + describe("run", () { + it("should set the injector property", () { + var body = setBody('