angular-directus
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "angular-directus", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Angular wrapper for getdirectus.com Javascript SDK", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -11,20 +11,25 @@ var Directus = require('directus-sdk-javascript'); | ||
*/ | ||
DirectusProvider.$inject = []; | ||
function DirectusProvider() { | ||
let directus; | ||
this.directus; | ||
provider.init = function init(key,url,version){ | ||
directus = new Directus(key,url,version); | ||
this.init = function init(url,key,version){ | ||
this.directus = new Directus(key,url,version); | ||
} | ||
provider.getEntries = function (table){ | ||
directus.getEntries(table, (err, res) => { | ||
if(err) throw err; | ||
console.log(res); | ||
}); | ||
} | ||
return provider; | ||
this.$get = function (){ | ||
return this; | ||
} | ||
} | ||
function DirectusService(directusConfig){ | ||
var self = this; | ||
directusConfig.directus.getEntries(table, (err, res) => { | ||
if(err) throw err; | ||
console.log(res); | ||
}); | ||
} | ||
ngDirectusModule | ||
.provider('Directus', DirectusProvider); | ||
.provider('directusConfig', DirectusProvider) | ||
.service('directus', DirectusService); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1555
40