Attach the module object to the app object before starting the module and not during the module objects initialization.