Support forum for ASP.NET Zero (https://aspnetzero.com/).
By klir
#31953 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:
Code: Select all{{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