Added autocompletion

This commit is contained in:
Marcin Kurczewski
2014-10-05 13:25:40 +02:00
parent b57fee0ad8
commit adfc120642
11 changed files with 320 additions and 31 deletions

View File

@ -0,0 +1,27 @@
var App = App || {};
App.Services = App.Services || {};
App.Services.TagList = function(jQuery) {
var tags = [];
jQuery.ajax({
success: function(data, textStatus, xhr) {
tags = data;
},
error: function(xhr, textStatus, errorThrown) {
console.log(new Error(errorThrown));
},
type: 'GET',
url: '/data/tags.json',
});
function getTags() {
return tags;
}
return {
getTags: getTags,
};
};
App.DI.registerSingleton('tagList', ['jQuery'], App.Services.TagList);