Skip to content
This repository was archived by the owner on Jun 19, 2024. It is now read-only.

Commit f8e22ac

Browse files
author
Élio Cró
committed
Added support for angular 1.6
1 parent 727735f commit f8e22ac

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/solstice.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@
1111
setEndpoint: function (url) {
1212
defEndpoint = url;
1313
},
14-
$get: ['$http', function ($http) {
14+
$get: ['$http', '$sce', function ($http, $sce) {
1515
function Solstice(endpoint) {
1616
this.search = function(options) {
17-
var url = endpoint + '/select/';
17+
var url = $sce.trustAsResourceUrl(endpoint + '/select/');
1818
var defaults = {
19-
wt: 'json',
20-
'json.wrf': 'JSON_CALLBACK'
19+
wt: 'json'
2120
};
2221
ng.extend(defaults, options);
2322
return $http.jsonp(url, {
24-
params: defaults
23+
params: defaults,
24+
jsonpCallbackParam: 'json.wrf'
2525
});
2626
};
2727
this.withEndpoint = function (url) {

0 commit comments

Comments
 (0)