(function(){ var projectService = function($http){ var getUsers = function(project){ console.log() return $http.get("/rest/api/2/project") .then(function(response){ console.log(response); console.log(response.data); return response.data; }); }; return { get: projectKeys }; }; var module = angular.module("postExample"); module.factory("projectService", projectService);}());--
You received this message because you are subscribed to the Google Groups "Atlassian Connect Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to atlassian-connec...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
app.factory('jira', function ($timeout) {
return {
project: function (success, error) {
AP.require('request', function (request) {
request({
url: '/rest/api/2/project',
success: function (responseText) {
$timeout(function () {
success(JSON.parse(responseText));
}, 0);
},
error: function () {
$timeout(function () {
error();
}, 0);
}
});
});
},
}
});var success = function (project) {...};
var error = function () {...};I have written this service to get all the projects in JIRA but it is hitting localhost:3000 where my app is running. What should be the cortrect approach.(function(){var projectService = function($http){var getUsers = function(project){console.log()return$http.get("/rest/api/2/project").then(function(response){console.log(response);console.log(response.data);returnresponse.data;});};return{get: projectKeys};};
...
I have written this service to get all the projects in JIRA but it is hitting localhost:3000 where my app is running. What should be the cortrect approach.(function(){var projectService = function($http){var getUsers = function(project){console.log()return$http.get("/rest/api/2/project").then(function(response){console.log(response);console.log(response.data);returnresponse.data;});};return{get: projectKeys};};
...