Base solution for your next web application
Open Closed

TypeScript with AngularJs #6585


User avatar
0
andmattia created

we are moving to TypeScript all our solution and after some test we have some open issue. I try NSwag to generate the AnguarlJS proxy but our solution has a lot of method and in some module the signature is duplicate. Since now Swagger work well and any module can ruoute the correct path but Nswag not works fine, so I try to use

/api/TypeScript?isCompleteService=true

But I have another issue AppService in some case are not able to solve AppService name and collision of Object name (es. HolidayAppService i get method to get list my complex object contain base class Holiday (came from .Core module) and the proxy class has to export class Holiday) For this issue we evaluate a refator to move all method from raw objet to Dto.

But the big issue right now is an error on .ts file generate on both (abp proxy or nSwag)

export class customAttributeData {
        attributeType: type;
        constructor : constructorInfo;
        constructorArguments: iListOfCustomAttributeTypedArgument;
        namedArguments: iListOfCustomAttributeNamedArgument;
    }

this class has an attribute named constructur but it's a reserved words so I need to change my TS file to rename this property.

Anyone has the same issue. This happen using abp or using NSwag


3 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    @andmattia

    It is a problem about NSWAG I guess. Have you checked it's own repository to see if there are any similar issues ?

  • User Avatar
    0
    andmattia created

    @ismcagdas

    I open a issue on Git I try to fix it localy if it works I send a PR to NSwag. So has you try to use TypeScript with ABP AngularJs? Beacuse i try to move to TS our solution but is not quite simple integrate on ABP. My road map is:

    1. Move new JS to TypeScript
    2. Try to use Nswag for proxy on AngularJs (I see that exist a TypeScript method on ABP api but not works very well)
    3. Create a Angulr+AngularJs (hybrid) app
    4. Move all project to .NetCore

    I think is the only way to upgrade to .NetCore

  • User Avatar
    0
    ismcagdas created
    Support Team

    So has you try to use TypeScript with ABP AngularJs?

    No, we haven't tried that.