Coder Social home page Coder Social logo

angular2-odata's Introduction

Hi there ๐Ÿ‘‹

  • ๐Ÿ”ญ Iโ€™m currently working on a plan to save the world
  • ๐ŸŒฑ Iโ€™m currently learning graphql kubernetes

angular2-odata's People

Contributors

atsanko avatar gallayl avatar greenkeeperio-bot avatar stefh avatar william-lohan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

angular2-odata's Issues

Support for $batch

Is it possible to send $batch requests that encapsulate other requests, e.q. MERGE?
Thanks

For OData V4 : $count=true is not supported yet.

Can you please add the option for Count().

In query.ts add method:

private _count: boolean;
    public Count(count: boolean): ODataQuery<T>{
        this._count= count;
        return this;
}

However, this means that the Exec method should return a new object like PagedResult which includes the data and the count. Or maybe better to add a new method ExecWithCount().

Like:

class PagedResult<T> {
    data: Observable<Array<T>>;
    count: number;
}

I can try to make a PR, but probably you know better how to add this functionality and publish a new npm.

Fix string based keys that start with number

Replace if (!parseInt(entityKey, 10)) { at https://github.com/gallayl/angular2-odata/blob/master/src/config.ts#L26 with if (isNaN(entityKey)) { or if (!/^[0-9]*$/.test(entityKey)) {

console.group('parseInt');
console.log(!parseInt('asdf', 10));    // true
console.log(!parseInt('2sdf', 10));    // false <- issue for keys like 35d585e3-a357-4149-922e-61bcda3cf35e
console.log(!parseInt('2345', 10));    // false
console.log(!parseInt(null, 10));      // true
console.log(!parseInt(undefined, 10)); // true
console.groupEnd();

console.group('isNaN');
console.log(isNaN('asdf'));    // true
console.log(isNaN('2sdf'));    // true
console.log(isNaN('2345'));    // false
console.log(isNaN(null));      // false
console.log(isNaN(undefined)); // true
console.groupEnd();

console.group('regex');
console.log(!/^[0-9]*$/.test('asdf'));    // true
console.log(!/^[0-9]*$/.test('2sdf'));    // true
console.log(!/^[0-9]*$/.test('2345'));    // false
console.log(!/^[0-9]*$/.test(null));      // true
console.log(!/^[0-9]*$/.test(undefined)); // true
console.groupEnd();

ORIGINAL EXCEPTION: TypeError: class constructors must be invoked with |new|

Hi

I'm trying to combine several example projects:

My example project can be found at:
https://github.com/StefH/angular2-webpack-starter

However when enabling the my-category-grid-odata component in the "car.component.html" file, I get error like:

ORIGINAL EXCEPTION: TypeError: class constructors must be invoked with |new|
ORIGINAL STACKTRACE:
MyODataConfig@http://localhost:3000/main.bundle.js:1030:10
anonymous/_View_CarComponent0.prototype.createInternal@CarComponent.ngfactory.js:42:34

The providers are loaded as:

@Component({
    templateUrl: './categoryGridOData.component.html',
    selector: 'my-category-grid-odata',
    providers: [ { provide: ODataConfiguration, useClass: MyODataConfig }, ODataServiceFactory ],
    styleUrls: [ './carGrid.component.css']
})
export class CategoryGridODataComponent {

Do you have a clue ?

Project alive? Alternative choice?

The simply potentially an extremely useful project, but it has not been updated in 10 months during which Angular itself has been advancing. The version dependencies still point to 2.1.0, which suggests it hasn't even been tested but anything newer.

Is there a fork of the project still "alive" somewhere? Or did it turn out not to be actually useful after all? Or is there a different Angular OData implementation people are using?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.