angular-extensions / elements

Lazy load Angular Elements (or any other web components / custom elements ) with ease!
https://angular-extensions.github.io/elements/
MIT License
315 stars 40 forks source link

Not able to refresh/reload angular element using axLazyElement through Angular Proxy #113

Closed edgarjoao closed 2 years ago

edgarjoao commented 2 years ago

Hi there, I'm not able to reload/refresh my angular element through Angular Proxy.

Expected scenario: axLazyElement after a refresh Web Browser must be able to identify if resource is available o not, currently the angular element is cached in the web browser.

axLazyElement directive

<ng-template #loadingpink>Loading pink-ui...</ng-template>
<ng-template #errorpink>Error trying to load pink-ui</ng-template>
<pink-ui *axLazyElement="pinkUrl; errorTemplate: errorpink; loadingTemplate: loadingpink;"></pink-ui>

proxy.conf.js

    {
        context: ["/pink-ui"],
        target: "http://localhost:4201",
        secure: false,
        pathRewrite: {
            "^/pink-ui": ""
        },
        changeOrigin: true,
        logLevel: "debug"
    }

504 status error through proxy when micro app is down

image

Version used

  "@angular-extensions/elements": "^13.0.0",
  "@angular/common": "~12.2.0",
  "@angular/compiler": "~12.2.0",
  "@angular/core": "~12.2.0"