Failed to load ressource Angular app

Hi,

I have a problem with my angular application, it doesn’t display even though I put all the files in the dist folder in the manifest

fx_version 'cerulean'
game 'gta5'

author 'Azylium'
version '0.0.1'

client_script "nui.lua"

ui_page "html/index.html"

files {
  "html/index.html",
  "html/background.6aacb5cadf82cc09a509.png",
  "html/favicon.ico",
  "html/main.e9f186094e18251b71db.js",
  "html/polyfills.8a38637f87360deff555.js",
  "html/runtime.668795c7b1ccd90bd8c2.js",
  "html/styles.3f59730adabf73b1a69b.css",

  "html/assets/icons/appstore.png",
  "html/assets/icons/calculator.png",
  "html/assets/icons/call.png",
  "html/assets/icons/camera.png",
  "html/assets/icons/contacts.png",
  "html/assets/icons/health.png",
  "html/assets/icons/mail.png",
  "html/assets/icons/message.png",
  "html/assets/icons/news.png",
  "html/assets/icons/notes.png",
  "html/assets/icons/photos.png",
  "html/assets/icons/settings.png",
  "html/assets/avatar.png",
  "html/assets/background.png",
}

When I look at the fivem debugger in the console I get this error:

My listener:

@HostListener('window:message', ['$event'])
  onMessage(event: MessageEvent) {
    if (event.data.type == 'enableui') {
      this.isVisible = event.data.enable;
    }
  }

My lua:

function EnableGui(enable)
  SetNuiFocus(enable, enable)
  guiEnabled = enable

  SendNUIMessage({
    type = "enableui",
    enable = enable
  })
end

Do you have any ideas?

did u solve it? i got the same error

I think I use this for build:

ng build --build-optimizer --base-href ./ --output-hashing none

so I have main.ts and not main.48219611.ts

1 Like

thank you ;D