Giter VIP home page Giter VIP logo

joli.api.js-app-demo's People

Contributors

xavierlacot avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

Forkers

steerapi joanrm20

joli.api.js-app-demo's Issues

Does joli.api work with the commonjs specification ?

Hi,

Im trying to use the joli.api but not having much success. Im using the Commonjs specification.

Do i just need to require joli and joli.api ? :

var joli = require('lib/joli').connect('db'),
joliapi = require('lib/joli.api');

Then i should be able to define my models ?

var model = new joli.apimodel({ //options });

I have tried the above with no success, i keep getting an exception:
'new joli.apimodel' undefined is not a function

I would be grateful for any help you can give me.

Thanks

Struggling getting this to run

Hi

if i run this project directly it doesnt work for me hear is where im at.

Had to make sure i included the joli.api.js and joli.js

I could get it to work straight away so i had to change the app.js to bellow.

(function(){
  // load joli library and models definition file

  joli = require('/lib/vendor/joli/joli').connect('syncme');
  joliApi = require('/lib/vendor/joli/joliapi').joliApi(joli);
  Ti.include('/lib/model/models.js');
  Ti.API.info('Runing...'); 
  joli.models.initialize();

  // initialize the app
  models.news.truncate();
  // load the people from the service
  models.news.forceReload();

  // load our app and execute it
  Ti.include('/lib/view/app.js');
  app.execute();
})();

So this will run but i am now getting the following error my json is being parsed correctly.

[ERROR] Script Error = 'undefined' is not an object (evaluating 'constraints.where') (unknown file).

so i have found the function in joli.api.js and it return null

joli.apimodel.prototype = {
        all: function(constraints) {
            Ti.API.info('Runing Api...');
            Ti.API.info(constraints); 
//above returns null

Any suggestions on why this is happening do you having a full project i can work from.

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.