- Notifications
You must be signed in to change notification settings - Fork26.7k
Description
I'm submitting a...
[ ] Regression (a behavior that used to work and stopped working in a new release)[x] Bug report [ ] Feature request[ ] Documentation issue or request[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#questionCurrent behavior
JitCompilerFactory already exported to public api from this#20478
but when i install Angular 5 then start using it got some error in production
my codeexport function compilerFactory() { return new JitCompilerFactory([{useJit:true}]).createCompiler() }
ERROR in src/app/app.module.ts(11,9): error TS2554: Expected 0 arguments, but got 1. src/app/dynamic/dynamic.component.ts(17,8): error TS2339: Property 'component' does not exist on type 'DynamicComponent'.
it seems JitCompilerFactory no need arguments, then i tried without arguments
export function compilerFactory() { return new JitCompilerFactory().createCompiler() }
then i got new error
ERROR TypeError: Cannot read property 'useJit' of undefined
i tried manually editcompiler_factory.d.ts
export declare class JitCompilerFactory implements CompilerFactory { private _defaultOptions; constructor(options: CompilerOptions[]) <<< i add this constructor createCompiler(options?: CompilerOptions[]): Compiler; }
after that im trying compile again but got new error :
Uncaught (in promise): Error: Unexpected value 't' imported by the module 'function (){}'. Please add a @NgModule annotation.
Expected behavior
how to fix this, Thanks
Minimal reproduction of the problem with instructions
https://github.com/jackzard/Angular5JitCompilerFactory
Environment
Angular version: 5.1.0-beta.2For Tooling issues:- Node version: 8.9 - Platform: Mac Others: