Hi Jennifer,

You don't need the $sce stuff in your $http request.  Do something like:

myApp.service("APIService", ['$http', '$log', '$sce', function ($http, $log, 
$sce)
    {

    this.RetrvDataMainGrid = function () 
    {
    var urlToSend = 'http://localhost:2857/api/' + 'SearchMasterGetList/' + 
p_PlunkRandomString;
    $http({
        method: 'JSONP',
        url: urlToSend
    }).then(function successCallback(response) {
        return response;
    }, function errorCallback(response) {
        console.log(response);
        return null;
    });

    }

$sce.thust* is only needed if you need to put anything in your view!

Regards
Sander

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to