I use a snippet which loads strings from an external json-file. Everything works fine, but when I start the function locally, I get a 'cross origin'-issue. Therefore, I want to put the strings directly in my JS, but it do not work.
Origin JS
$scope.loadAutosuggest = function(query) {
return $http.get('data.json');
};
data.json
[
"In Progress: Yes",
"In Progress: No"
]
I´ve tried to do this like here (but it do not work)
$scope.loadAutosuggest = [
"In Progress: Yes",
"In Progress: No"
];
Do you have any tips for me? Thank you
gruntgithub.com/gruntjs/grunt-contrib-connectSimpleHTTPServerdocs.python.org/2/library/simplehttpserver.html or any you have in touch$http.get()obviously needs resources on server..ng-repeat="autoSuggest in loadAutoSuggest"notng-repeat="autoSuggest in loadAutoSuggest(someParam)