How to call data from a WCF service?


Hi I have a WCF service connected to a SQL server database.
I am testing with ionic serve in my browser if that makes a difference?
This is what I have tried:

      .success(function(GetData) {
                $scope.employee = GetData; //shows result in html page
          .error(function(GetData) {

In my console log it shows that I have a connection to the web service (XHR finished loading: GET “http://localhost:53101/Service.svc”.) but I cant seem to figure out how to call a method from the service. Thank you.

P.S if my coding looks wrong on top sorry it may be, I am still learning angularjs (I am a noob) :smile:


it dependence how your wfc looks like^^.

Here is a good and full wfc + angular.js tutorial.
Read the Point: 3. Services.JS

It’s like calling any other API --> http://localhost:53101/Service.svc is your base path and you need to add the function name behind: http://localhost:53101/Service.svc/MyGetFunction