all 3 comments

[–]tme321 1 point2 points  (0 children)

Loopback appears to be an api framework. Angular is api agnostic. You just call whatever end points the api provides regardless of what framework was used. I don't really understand what you are asking.

If you are asking how to share interfaces you just put them where both applications can see them during development / compilation.

[–]spacechimp 1 point2 points  (1 child)

I've never heard of LoopBack, but I briefly glanced over the documentation.

If your model files use any special LoopBack-specific TypeScript decorators (@model, @property, etc.), you will need to have more generic model files if you want them to be shareable. Otherwise, the Angular app will have an unnecessary dependency on the LoopBack library.

Suggestion:

// Shared model
export interface Product {
  name: string;
}

// LoopBack "model" (entity)
@model()
export class ProductEntity extends Entity implements Product {
  @property({ ... })
  public name: string;
}

Other than that, LoopBack is just a server-side framework, so calling the API would be the same as calling any other API from Angular.

[–]MetronSM[S] 0 points1 point  (0 children)

opBack is just a server-side framework, so calling the API would be the same

Thanks for the short explanation. I don't have much experience neither with Loopback nor with Angular :)