function () { function TodoService(http) { this.http = http; this.headers = new http_1.Headers({ 'Content-Type': 'application/json' }); this.todosApiUrl = '/api/todos/test'; } TodoService.prototype.getTodos = function () { return this.http.get(this.todosApiUrl) .toPromise() .then(function (response) { return response.json(); }); }; TodoService = __decorate([ core_1.Injectable(), __metadata('design:paramtypes', [http_1.Http]) ], TodoService); return TodoService; }()
function () { function TaskService(http) { this.http = http; this.baseurl = 'http://localhost:5000/api/'; this.data = null; } TaskService.prototype.getAll = function () { var _this = this; var url = this.baseurl + 'tasks'; return new Promise(function (resolve) { var headers = new http_1.Headers(); headers.append('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8'); headers.append("Accept", "text/html; charset=UTF-8"); _this.http.get(url, { headers: headers }).map(function (res) { return res.json(); }).subscribe(function (data) { console.log(data); _this.data = data; resolve(_this.data); }, function (error) { console.log(error.json()); }); }); }; return TaskService; }()
var url = this.baseurl + 'tasks'; return new Promise(function (resolve) { var headers = new http_1.Headers(); headers.append('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8'); headers.append("Accept", "text/html; charset=UTF-8"); var url = this.baseurl + 'tasks'; return new Promise(function (resolve) { var headers = new http_1.Headers(); headers.append('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8'); headers.append("Accept", "text/html; charset=UTF-8"); var url = this.baseurl + 'tasks/' + task_id; return new Promise(function (resolve) { var headers = new http_1.Headers(); headers.append('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8'); headers.append("Accept", "text/html; charset=UTF-8"); var url = this.baseurl + 'tasks/' + task_id; return new Promise(function (resolve) { var headers = new http_1.Headers(); headers.append('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8'); headers.append("Accept", "text/html; charset=UTF-8");
var url = this.baseurl + 'user'; return new Promise(function (resolve) { var headers = new http_1.Headers(); headers.append('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8'); headers.append("Accept", "text/html; charset=UTF-8"); var url = this.baseurl + 'user/auth'; return new Promise(function (resolve) { var headers = new http_1.Headers(); headers.append('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8'); headers.append("Accept", "text/html; charset=UTF-8");
function () { function AccountService(http) { this.http = http; this.baseurl = 'http://localhost:5000/api/'; this.data = null; } AccountService.prototype.loginUser = function (item) { var _this = this; var url = this.baseurl + 'Account/Login'; return new Promise(function (resolve) { var headers = new http_1.Headers(); headers.append('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8'); headers.append("Accept", "text/html; charset=UTF-8"); _this.http.post(url, item, { headers: headers }).map(function (res) { return res.json(); }).subscribe(function (data) { console.log(data); _this.data = data; resolve(_this.data); }, function (error) { console.log(error.json()); }); }); }; return AccountService; }()
function () { function TaskService(http) { this.http = http; this.baseurl = 'http://localhost:5000/api/'; this.data = null; } TaskService.prototype.getAll = function () { var _this = this; var url = this.baseurl + 'tasks'; return new Promise(function (resolve) { var headers = new http_1.Headers(); headers.append('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8'); headers.append("Accept", "text/html; charset=UTF-8"); _this.http.get(url, { headers: headers }).map(function (res) { return res.json(); }).subscribe(function (data) { console.log(data); _this.data = data; resolve(_this.data); }, function (error) { console.log(error.json()); }); }); }; return TaskService; }()
function () { function AccountService(http) { this.http = http; this.baseurl = 'http://localhost:5000/api/'; this.data = null; } AccountService.prototype.loginUser = function (item) { var _this = this; var url = this.baseurl + 'Account/Login'; return new Promise(function (resolve) { var headers = new http_1.Headers(); headers.append('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8'); headers.append("Accept", "text/html; charset=UTF-8"); _this.http.post(url, item, { headers: headers }).map(function (res) { return res.json(); }).subscribe(function (data) { console.log(data); _this.data = data; resolve(_this.data); }, function (error) { console.log(error.json()); }); }); }; return AccountService; }()
var url = this.baseurl + 'user'; return new Promise(function (resolve) { var headers = new http_1.Headers(); headers.append('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8'); headers.append("Accept", "text/html; charset=UTF-8"); var url = this.baseurl + 'user/auth'; return new Promise(function (resolve) { var headers = new http_1.Headers(); headers.append('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8'); headers.append("Accept", "text/html; charset=UTF-8");
var url = this.baseurl + 'tasks'; return new Promise(function (resolve) { var headers = new http_1.Headers(); headers.append('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8'); headers.append("Accept", "text/html; charset=UTF-8"); var url = this.baseurl + 'tasks'; return new Promise(function (resolve) { var headers = new http_1.Headers(); headers.append('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8'); headers.append("Accept", "text/html; charset=UTF-8"); var url = this.baseurl + 'tasks/' + task_id; return new Promise(function (resolve) { var headers = new http_1.Headers(); headers.append('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8'); headers.append("Accept", "text/html; charset=UTF-8"); var url = this.baseurl + 'tasks/' + task_id; return new Promise(function (resolve) { var headers = new http_1.Headers(); headers.append('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8'); headers.append("Accept", "text/html; charset=UTF-8");