Giter Club home page Giter Club logo

Comments (4)

vance avatar vance commented on September 1, 2024

Ah! I see from the spec:


            it('should work with dates with odatav4 and specified type', function() {
                var value = new $odata.Value(new Date("06/02/2015 10:23"),'datetime');
                expect(value.execute(true)).toMatch(/^2015-06-02T.+Z$/);
            });

I shall try this.

from odataangularresources.

vance avatar vance commented on September 1, 2024

Sorry, I'm at a loss here. I tried everything to supply the datetime type to filter. It always hits the executeWithUndefinedType I'm digging through the source and the specs and still can't figure it out.

theResource.filter( filter.property.name, filter.operator.operator, filterValue );

if i try filterValue = { value: myDate, type:'datetime' } I get an error that [object object] is not allowed. I also tried various ways of doing odatajs.Value( myDate, 'datetime') etc. but I'm not sure how to do this.

thanks for the help!

from odataangularresources.

devnixs avatar devnixs commented on September 1, 2024

Hi Vance,
Can you make sure that the argument that you passed is a JS Date object?
Can you also try to run the test by opening the file _SpecRunner.html ?
If all the tests are passing, then I you could to set breakpoints in the methods you want to debug and then comparing why it works in the tests and not in your project

from odataangularresources.

vance avatar vance commented on September 1, 2024

yes, I am performing angular.isDate(filterValue) before supplying to the filter....

Wait! I overlooked the obvious, I had not configured to odata v4! Duh! Sorry to have bothered you! It is a lot to keep track of, writing a generic implementation around ODataAngularResources while still also being relatively new to odata itself.

   var url = this.utils.path.combine(Settings.apiServer, 'odata', service.name );
    var odataResource:OData.IResourceClass<any> = this.odataResource(url, {}, {}, {
      isodatav4: true
    });

from odataangularresources.

Related Issues (20)

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.