This is my service:
app.factory('ApiStoreService', function ($q) {
return $q(function (resolve, reject) {
new SwaggerApi({
discoveryUrl: "https://apiurl",
apiKeyName : "apiKey",
apiKey: "xxxxxxxxx",
success: function () {
resolve(this);
}
});
})
});
which I call this way:
ApiStoreService.then(function (store) {// do something with store}
I want to pass the hardcoded values as parameters. What's the best way to achieve this in angular?