Base solution for your next web application
Open Closed

RAD Tool / LookUps / Angular #5602


User avatar
0
klir created

Hi,

I'm using .NetCore + Angular6 template, when I create lookups to the same entity in different tables, the Rad Tool generate the same files with the same Component name in angular under each entity folder. As components have the same name it only adds the first one to the NGModules main.module.ts. This is causing errors when I try to build for production, so to solve fix this I had to rename all duplicates components and manually add them to the MainModule.

Now, I've customized all the lookup template files in the rad tool. So instead of the name of the foreign entity I've added the plural name of the entity, I can use something like that:

{{entity_Name_Plural_Here}}-{{nP_Foreign_Entity_Name_Here}}

So 3 questions regarding to this topic: 1 Where can I find documentation of the RadTool for customizing templates? Which placeholders can I use?

2 Is anyone else having the same issue with lookup fields? Did you come up with another fancy solution for this?

3 Not related with the RadTool now, and apologize as I'm new in Angular. But just looking at the lookup components they are "All" the same thing and the only thing that changes is the entity service proxy and the DTO. Has anyone refactored the lookups so it can be reused? The problem would be to inject the right object, I've tried using typescript interfaces and use generics with no luck. Any suggestion here would it be more than welcome.

Regards


2 Answer(s)
  • User Avatar
    0
    yekalkan created
    1. see <a class="postlink" href="https://aspnetzero.com/Documents/Development-Guide-Rad-Tool">https://aspnetzero.com/Documents/Develo ... e-Rad-Tool</a> There is not a list of placeholders but you can find them in templates.

    2. I think the best solution is to use the same ones in common.

    3. see <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/issues/1049#issuecomment-381206936">https://github.com/aspnetzero/aspnet-ze ... -381206936</a>

  • User Avatar
    0
    klir created

    <cite>yekalkan: </cite> 3) see <a class="postlink" href="https://github.com/aspnetzero/aspnet-ze">https://github.com/aspnetzero/aspnet-ze</a> ... -381206936

    Thanks