io-informatics / angular-jsonld

JSON-LD Client for AngularJS
32 stars 6 forks source link

.withContext() seems to reset base url #9

Open danmichaelo opened 8 years ago

danmichaelo commented 8 years ago

With this code, based on the example in the readme, the base url is not used. If I remove .withContext(…), the base url is used.

  JsonldRest.setBaseUrl('http://www.wikidata.org');

  var entities = JsonldRest.collection('/entity').withContext({
    "schema": "http://schema.org/",
    "fullName": "schema:name"
  });

  entities.one('Q42').get().then(function(res) {
    console.log(res);
  });
ghost commented 8 years ago

+1 same here