Giter VIP home page Giter VIP logo

Comments (5)

adumesny avatar adumesny commented on June 2, 2024

no idea. you need to post the simplest possible case showing the issue if the bug is in the lib.

from gridstack.js.

ringo-anva avatar ringo-anva commented on June 2, 2024

@adumesny simplest possible case can be found here:
https://github.com/ringo-anva/gridstack

I created one host and two remotes.

When you switch between remote 1 and remote 2 you will get the 'warning' (which causes some issue for us):

NG0912: Component ID generation collision detected. Components 'GridstackItemComponent' and 'GridstackItemComponent' with selector 'gridstack-item' generated the same component ID. To fix this, you can change the selector of one of those components or add an extra host attribute to force a different ID. Find more at https://angular.io/errors/NG0912

Cheers,
Ringo.

from gridstack.js.

ringo-anva avatar ringo-anva commented on June 2, 2024

@adumesny

Steps to Reproduce:
checkout main at repo https://github.com/ringo-anva/gridstack
npm install
npm run start
open devtools console
click on menu option 'remote 1'
click on menu optioni 'remote 2'

from gridstack.js.

csgentile avatar csgentile commented on June 2, 2024

Hi @ringo-anva. I saw that you marked as solved your problem in this issue >>> #20430.

I checked your repo but you haven't posted yet the changes you made to make it work. Could you share your solution to see what approach did you follow? I need to see what should I change in my project configuration in order to get rid of this problem.

Thanks in advance.

from gridstack.js.

ringo-anva avatar ringo-anva commented on June 2, 2024

@csgentile

At file module-federation.config.ts in each remote and host it should look like:


const config: ModuleFederationConfig = {
  name: 'apps/gridstackmf/remote1',
  exposes: {
    './Routes': 'apps/gridstackmf/remote1/src/app/remote-entry/entry.routes.ts',
  },
  additionalShared: [
    {
      libraryName: 'gridstack/dist/angular',
      sharedConfig: { singleton: true },
    },
  ],
};

export default config;

So addding the additionalShared solve it, good luck.

from gridstack.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.