loopback-sdk-builder icon indicating copy to clipboard operation
loopback-sdk-builder copied to clipboard

Doesn't work on Angular 10

Open vanderdill opened this issue 4 years ago • 10 comments

What type of issue are you creating?

  • [ ] Bug
  • [x] Enhancement
  • [ ] Question

What version of this module are you using?

  • [x] 2.0.10 (Stable)
  • [ ] 2.1.0-rc.n (2.1 Release Candidate n)
  • [ ] Other

Please add a description for your issue:

Angular 10 now requires template on ModuleWithProviders class. So, the following line on index.ts: }): ModuleWithProviders {

showld be: }): ModuleWithProviders<SDKBrowserModule> {

vanderdill avatar Jul 01 '20 19:07 vanderdill

I've added a fix & opened a pull req: https://github.com/mean-expert-official/loopback-sdk-builder/pull/657

Schinkentanz avatar Jul 24 '20 10:07 Schinkentanz

I've added a fix & opened a pull req: #657

Unfortunately the author(s) doesn't seem to keep mantaining the project. There are pull request opened from 2018 :/. I've made my own fork to fix this.

vanderdill avatar Jul 24 '20 14:07 vanderdill

Dito ;) but at least i tried

Schinkentanz avatar Jul 24 '20 14:07 Schinkentanz

Same here, would be nice that it gets fixed but I guess that won't happen..

psomby avatar Aug 06 '20 07:08 psomby

I've added a fix & opened a pull req: #657

Unfortunately the author(s) doesn't seem to keep mantaining the project. There are pull request opened from 2018 :/. I've made my own fork to fix this.

Can you share that by any chance? :-) @vanderdill

rollwhistler avatar Mar 22 '21 11:03 rollwhistler

@rollwhistler You can install dependencies by defining them by their github.com path. That way you could use my fork or fork it yourself 🙂 👍

{
  "devDependencies": {
    "@mean-expert/loopback-sdk-builder": "Schinkentanz/loopback-sdk-builder#0e05fb6"
  }
}

Schinkentanz avatar Mar 22 '21 12:03 Schinkentanz

Thanks @Schinkentanz, I cannot just fork it myself since I would need to implement the fixes, which I don't know how to right now :-), I was hoping for a working updated version of this.

Does yours work with Angular 10? I'll give it a try, thank you!

rollwhistler avatar Mar 22 '21 12:03 rollwhistler

😄 Yes, I used this fix with v10 and currently with v11.2.2 👍

Schinkentanz avatar Mar 22 '21 13:03 Schinkentanz

src/app/shared/sdk/services/custom/logger.service.ts:51:13 - error TS2339: Property 'profileEnd' does not exist on type 'Console'.

Will this go away if I update to angular 11? :-D.

Ok, it was my fault, I got old type definitons on my package.json, I updated to "@types/node": "^10.17.55" and now is fine.

rollwhistler avatar Mar 26 '21 09:03 rollwhistler

Look at Loopback 4 documentation Building an Angular Application from OpenAPI Specification which shows how to generate an OpenAPI spec JSON file and then generate models for the Angular application.

jbratu avatar Jun 15 '21 17:06 jbratu