Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

JitCompilerFactory Bug at Angular 5 #20639

Closed
Assignees
ocombe
Labels
area: coreIssues related to the framework runtime
@jackzard

Description

@jackzard

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#question

Current 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 code
export 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

@ocombe

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:

Metadata

Metadata

Assignees

Labels

area: coreIssues related to the framework runtime

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp