Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating Jinqu Angular HttpClient Ajax provider #36

Closed
buchatsky opened this issue Jan 21, 2022 · 3 comments
Closed

Creating Jinqu Angular HttpClient Ajax provider #36

buchatsky opened this issue Jan 21, 2022 · 3 comments

Comments

@buchatsky
Copy link
Collaborator

Jinqu Angular HttpClient Ajax provider

Passing OData queries through Angular HttpClient

import { Injectable } from "@angular/core";
import { HttpClient } from "@angular/common/http";
import { ODataService } from 'jinqu-odata';

import { AngularHttpProvider } from 'jinqu-ng-http';
import { Product } from './models';

@Injectable()
export class NorthwindContext extends ODataService {
  constructor(http: HttpClient) {
    super('odata/', new AngularHttpProvider(http));
  }

  get products() { return this.createQuery<Product>('products'); }
}
@buchatsky
Copy link
Collaborator Author

I've already implemented it: jinqu-ng-http

  • Tests are written with jasmine (I failed to use mocha because it complained at zone.js)
  • withCredentials option is not used because it is absent in AjaxOptions

@umutozel you may copy or fork the repository and take over the ownership, I left your name as a package owner

@umutozel
Copy link
Member

Thank you for the Angular implementation.
My main goal to seperate providers entirely to make it possible for everyone to create a new one, so it can stay as it is.
Btw I plan to switch to jasmine too.

@buchatsky
Copy link
Collaborator Author

buchatsky commented Mar 29, 2022

Published under my name at https://www.npmjs.com/package/jinqu-ng-http

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants