Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Angular: Errors appear only when compiled with --aot #6835


User avatar
0
commondesk created

When i compile with

ng serve --configuration=linuxdev --host 0.0.0.0 --port 4200 --disable-host-check --aot

I get these errors.

ERROR in src/refindRoot/login-component-mobile/login.component.html(36,32): : Property 'multiTenancySideIsTeanant' does not exist on type 'LoginComponentMobile'. src/refindRoot/login-component-mobile/login.component.html(36,32): : Property 'isMultiTenancyEnabled' does not exist on type 'LoginComponentMobile'. src/refindRoot/login-component-mobile/login.component.html(49,19): : Property 'isSelfRegistrationAllowed' does not exist on type 'LoginComponentMobile'. src/refindRoot/login-component-mobile/login.component.html(53,19): : Property 'multiTenancySideIsTeanant' does not exist on type 'LoginComponentMobile'. src/refindRoot/login-component-mobile/login.component.html(53,19): : Property 'isTenantSelfRegistrationAllowed' does not exist on type 'LoginComponentMobile'. src/refindRoot/login-component-mobile/login.component.html(7,96): : Property 'login' does not exist on type 'LoginComponentMobile'. src/account/sign-up/sign-up.component.html(2,13): : Property 'firstFormGroup' does not exist on type 'SignUpComponent'. src/account/sign-up/sign-up.component.html(23,13): : Property 'secondFormGroup' does not exist on type 'SignUpComponent'. src/account/sign-up/sign-up.component.html(32,13): : Property 'thirdFormGroup' does not exist on type 'SignUpComponent'. src/account/sign-up/sign-up.component.html(51,9): : Property 'isMultiTenancyEnabled' does not exist on type 'SignUpComponent'. src/account/sign-up/sign-up.component.html(51,9): : Property 'loginService' is private and only accessible within class 'SignUpComponent'. src/account/sign-up/sign-up-form/sign-up-form.component.html(1,7): : Property 'onSubmit' does not exist on type 'SignUpFormComponent'.


3 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    Do they all exist on the component?

  • User Avatar
    0
    commondesk created

    Oh, my bad. I thought these were built-in's. but there my components.

  • User Avatar
    1
    commondesk created

    Just FYI, to compile with --AOT and other optmizer flags you need to expand nodes memory.

    I wrote a script that does this

    #!/usr/bin/env bash 
    node --max_old_space_size=5048 ./node_modules/@angular/cli/bin/ng $1 $2 $3 $4