-
Notifications
You must be signed in to change notification settings - Fork 25.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(core): change module semantics #10164
Conversation
const compilerFactory: CompilerFactory = platformRef.injector.get(CompilerFactory); | ||
var moduleRef = bootstrapModuleFactory( | ||
compilerFactory.createCompiler().compileAppModuleSync(DynamicModule), platformRef); | ||
const boundCompiler: Compiler = moduleRef.injector.get(Compiler); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is it "bound" and what is it bound to? to the platform? but every compiler instance is bound in that way. no?
Is there a design doc for new AppModules? |
0f8ddf2
to
829c0b0
Compare
326db0f
to
00a6e33
Compare
This is ready to review now! |
@IgorMinar @mhevery @vicb Please decide who should do the review... |
/cc @juliemr For the testing relating changes, especially the (deprecated) support of |
ngModuleByComponent.set(dirMeta.type.runtime, ngModuleMeta); | ||
} | ||
}); | ||
ngModuleMeta.exportedDirectives.forEach((dirMeta) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
obsolete
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -928,6 +868,68 @@ export declare class KeyValueDiffers { | |||
export declare function lockRunMode(): void; | |||
|
|||
/** @experimental */ | |||
export declare var NgModule: NgModuleMetadataFactory; | |||
|
|||
/** @stable */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mark all as experimental for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Reviewed in person with @IgorMinar |
@laco0416 This document (http://g.co/ng/modules) explains the angular team's plan for how NgModules will work. Still in-progress -- we are validating this week. |
@naomiblack Thank you. I'll prepare for the new style. |
e56446a
to
74841c9
Compare
This contains major changes to the compiler, bootstrap of the platforms and test environment initialization. Main part of angular#10043 BREAKING CHANGE: - Semantics and name of `@AppModule` (now `@NgModule`) changed quite a bit. This is actually not breaking as `@AppModules` were not part of rc.4. We will have detailed docs on `@NgModule` separately. - `coreLoadAndBootstrap` and `coreBootstrap` can't be used any more (without migration support). Use `bootstrapModule` / `bootstrapModuleFactory` instead. - All Components listed in routes have to be part of the `declarations` of an NgModule. Either directly on the bootstrap module / lazy loaded module, or in an NgModule imported by them.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Main part of #10043