Skip to content
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

Is ui-router AoT compatible? #3012

Closed
kolkov opened this issue Sep 18, 2016 · 6 comments
Closed

Is ui-router AoT compatible? #3012

kolkov opened this issue Sep 18, 2016 · 6 comments
Labels

Comments

@kolkov
Copy link

kolkov commented Sep 18, 2016

Compiler errors:

D:\Go\src\inframe\static2>node_modules/.bin/ngc -p tsconfig-aot.json
Error: Error encountered resolving symbol values statically. Function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol PublicModule in
 D:/Go/src/inframe/static2/app/public/public.module.ts, resolving symbol PublicModule in D:/Go/src/inframe/static2/app/public/public.module.ts
    at simplifyInContext (D:\Go\src\inframe\static2\node_modules\@angular\compiler-cli\src\static_reflector.js:469:23)
    at StaticReflector.simplify (D:\Go\src\inframe\static2\node_modules\@angular\compiler-cli\src\static_reflector.js:472:22)
    at StaticReflector.annotations (D:\Go\src\inframe\static2\node_modules\@angular\compiler-cli\src\static_reflector.js:61:36)
    at _loop_1 (D:\Go\src\inframe\static2\node_modules\@angular\compiler-cli\src\codegen.js:53:54)
    at CodeGenerator.readFileMetadata (D:\Go\src\inframe\static2\node_modules\@angular\compiler-cli\src\codegen.js:66:13)
    at D:\Go\src\inframe\static2\node_modules\@angular\compiler-cli\src\codegen.js:100:74
    at Array.map (native)
    at CodeGenerator.codegen (D:\Go\src\inframe\static2\node_modules\@angular\compiler-cli\src\codegen.js:100:35)
    at codegen (D:\Go\src\inframe\static2\node_modules\@angular\compiler-cli\src\main.js:7:81)
    at Object.main (D:\Go\src\inframe\static2\node_modules\@angular\compiler-cli\node_modules\@angular\tsc-wrapped\src\main.js:30:16)
Compilation failed

PublicModule:

var publicState = { name: 'public', url: '/public', component: PublicComponent };
var homeState = { name: 'public.home', url: '/home', component: PublicHomeComponent };
var aboutState = { name: 'public.about', url: '/about', component: PublicAboutComponent };
var userState = { name: 'public.user', url: '/user', component: PublicUserComponent };
var signupState = { name: 'public.user.signup', url: '/signup', component: PublicSignupComponent };
var loginState = { name: 'public.user.login', url: '/login', component: PublicLoginComponent };

@NgModule({
  imports: [
    CommonModule,
    NgbModule,
    FormsModule,
    UIRouterModule.forChild({
      states: [homeState, publicState, aboutState, userState, signupState, loginState]
    }),
  ],
  declarations: [
    PublicComponent,
    PublicAboutComponent,
    PublicHomeComponent,
    NgbdCarouselBasic,
    PublicLoginComponent,
    PublicUserComponent,
    PublicSignupComponent
  ],
  providers:[]
})
export class PublicModule { }
@christopherthielen christopherthielen modified the milestones: 1.0.0-final, 1.0.0-beta.3 Sep 21, 2016
@christopherthielen
Copy link
Contributor

No, not today. I hope to be AoT ready by 1.0 final.

@kolkov
Copy link
Author

kolkov commented Sep 23, 2016

OK, thanks!

@christopherthielen christopherthielen modified the milestones: 1.0.0-final, 1.0.0-beta.4 Oct 13, 2016
@tonimoeckel
Copy link

Are there any updates on this? The angular-cli version beta.22 forces us to use AOT compatible libs. So this issue is more important for many developers.

@kolkov
Copy link
Author

kolkov commented Dec 12, 2016

I think beta.4 that will compatible.

@aitboudad
Copy link

see ui-router/angular#13

@christopherthielen
Copy link
Contributor

This issue was moved to ui-router/angular#29

@christopherthielen christopherthielen modified the milestone: 1.0.0-final May 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants