How to map many to many relationships in angular 7Why use ICollection and not IEnumerable or List<T> on many-many/one-many relationships?How to use jQuery with Angular?Angular HTML bindingHow to detect a route change in Angular?Angular EXCEPTION: No provider for HttpAngular HTTP GET with TypeScript error http.get(…).map is not a function in [null]What is the equivalent of ngShow and ngHide in Angular 2+?How to bundle an Angular app for productionAngular/RxJs When should I unsubscribe from `Subscription`Huge number of files generated for every Angular project

History of the kernel of a homomorphism?

How do I allocate more memory to an app on Sheepshaver running Mac OS 9?

Find magical solution to magical equation

Javascript - Run my script only if landscape is detected

Voltage Balun 1:1

Are there terms in German for different skull shapes?

How do I, as a DM, handle a party that decides to set up an ambush in a dungeon?

Adding command shortcuts to /bin

How should I tell my manager I'm not paying for an optional after work event I'm not going to?

Why is my arithmetic with a long long int behaving this way?

What are the advantages of luxury car brands like Acura/Lexus over their sibling non-luxury brands Honda/Toyota?

Would you use "llamarse" for an animal's name?

Where are the "shires" in the UK?

Why did WWI include Japan?

Should I mention being denied entry to UK due to a confusion in my Visa and Ticket bookings?

Is Benjen dead?

Do publishers care if submitted work has already been copyrighted?

Has a commercial or military jet bi-plane ever been manufactured?

What do "Sech" and "Vich" mean in this sentence?

A factorization game

Should homeowners insurance cover the cost of the home?

Why did the Apollo 13 crew extend the LM landing gear?

Can I use a Cat5e cable with an RJ45 and Cat6 port?

Is any special diet an effective treatment of autism?



How to map many to many relationships in angular 7


Why use ICollection and not IEnumerable or List<T> on many-many/one-many relationships?How to use jQuery with Angular?Angular HTML bindingHow to detect a route change in Angular?Angular EXCEPTION: No provider for HttpAngular HTTP GET with TypeScript error http.get(…).map is not a function in [null]What is the equivalent of ngShow and ngHide in Angular 2+?How to bundle an Angular app for productionAngular/RxJs When should I unsubscribe from `Subscription`Huge number of files generated for every Angular project






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I'm just setting out on an Angular 7 project and wanted a decent way to join 2 entities together in a linked table. I'm looking at https://www.npmjs.com/package/ngx-treeview which could work but is not ideal because the tree needs to then be iterated to make each currently stored relationship show as checked. This is a slow process on larger trees and I was wondering if there might be a better solution than rendering the tree then iterating the values.



As a brief outline I'm linking products and services with a many to many relationship in EF Core so in the ngx ui for the product I'm listing the services in a tree view which can be checked to add the relationship. It's becoming a bit unwieldy with the shear amount of data.



getTree(): TreeviewItem[] 

let services = this.servicesService.services$;

const tree = [];
services.forEach(s =>

let c = [
];

s.products.forEach(p =>
c.push(
text: p.name + ' - ' + p.id, value: p.id, collapsed: true, checked: false
);
);

const treeItem = new TreeviewItem(
text: s.name + ' - ' + s.id, value: s.id, children: c, collapsed: true, checked: false
);

tree.push(treeItem);
);
return tree;



This displays the tree then I have to iterate with



let products = this.productsService.products$;









share|improve this question






























    0















    I'm just setting out on an Angular 7 project and wanted a decent way to join 2 entities together in a linked table. I'm looking at https://www.npmjs.com/package/ngx-treeview which could work but is not ideal because the tree needs to then be iterated to make each currently stored relationship show as checked. This is a slow process on larger trees and I was wondering if there might be a better solution than rendering the tree then iterating the values.



    As a brief outline I'm linking products and services with a many to many relationship in EF Core so in the ngx ui for the product I'm listing the services in a tree view which can be checked to add the relationship. It's becoming a bit unwieldy with the shear amount of data.



    getTree(): TreeviewItem[] 

    let services = this.servicesService.services$;

    const tree = [];
    services.forEach(s =>

    let c = [
    ];

    s.products.forEach(p =>
    c.push(
    text: p.name + ' - ' + p.id, value: p.id, collapsed: true, checked: false
    );
    );

    const treeItem = new TreeviewItem(
    text: s.name + ' - ' + s.id, value: s.id, children: c, collapsed: true, checked: false
    );

    tree.push(treeItem);
    );
    return tree;



    This displays the tree then I have to iterate with



    let products = this.productsService.products$;









    share|improve this question


























      0












      0








      0








      I'm just setting out on an Angular 7 project and wanted a decent way to join 2 entities together in a linked table. I'm looking at https://www.npmjs.com/package/ngx-treeview which could work but is not ideal because the tree needs to then be iterated to make each currently stored relationship show as checked. This is a slow process on larger trees and I was wondering if there might be a better solution than rendering the tree then iterating the values.



      As a brief outline I'm linking products and services with a many to many relationship in EF Core so in the ngx ui for the product I'm listing the services in a tree view which can be checked to add the relationship. It's becoming a bit unwieldy with the shear amount of data.



      getTree(): TreeviewItem[] 

      let services = this.servicesService.services$;

      const tree = [];
      services.forEach(s =>

      let c = [
      ];

      s.products.forEach(p =>
      c.push(
      text: p.name + ' - ' + p.id, value: p.id, collapsed: true, checked: false
      );
      );

      const treeItem = new TreeviewItem(
      text: s.name + ' - ' + s.id, value: s.id, children: c, collapsed: true, checked: false
      );

      tree.push(treeItem);
      );
      return tree;



      This displays the tree then I have to iterate with



      let products = this.productsService.products$;









      share|improve this question
















      I'm just setting out on an Angular 7 project and wanted a decent way to join 2 entities together in a linked table. I'm looking at https://www.npmjs.com/package/ngx-treeview which could work but is not ideal because the tree needs to then be iterated to make each currently stored relationship show as checked. This is a slow process on larger trees and I was wondering if there might be a better solution than rendering the tree then iterating the values.



      As a brief outline I'm linking products and services with a many to many relationship in EF Core so in the ngx ui for the product I'm listing the services in a tree view which can be checked to add the relationship. It's becoming a bit unwieldy with the shear amount of data.



      getTree(): TreeviewItem[] 

      let services = this.servicesService.services$;

      const tree = [];
      services.forEach(s =>

      let c = [
      ];

      s.products.forEach(p =>
      c.push(
      text: p.name + ' - ' + p.id, value: p.id, collapsed: true, checked: false
      );
      );

      const treeItem = new TreeviewItem(
      text: s.name + ' - ' + s.id, value: s.id, children: c, collapsed: true, checked: false
      );

      tree.push(treeItem);
      );
      return tree;



      This displays the tree then I have to iterate with



      let products = this.productsService.products$;






      angular entity-framework .net-core






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 23 at 3:47









      FRECIA

      3,83532640




      3,83532640










      asked Mar 23 at 1:26









      user1919214user1919214

      52




      52






















          0






          active

          oldest

          votes












          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55309746%2fhow-to-map-many-to-many-relationships-in-angular-7%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55309746%2fhow-to-map-many-to-many-relationships-in-angular-7%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현