Open Closed

Angular controller can not call application service #48

dinhienhy created


Angular controller can not call application service. Please review bellow code:

Angular controller:

angular.module('app').controller(controllerId, [
        function (log4netService) {
            var vm = this;

My application service:

public class Log4NetService : ApplicationService, ILog4NetService

Chrome console throw an error (please review attachment picture):

Do i have any mistake about convention code?

3 Answer(s)
  • 0
    hikalkan created
    Support Team

    I think it should be '' instead of ''.

    For such cases, you can check auto-generated proxy:

    <a class="postlink" href="http://your-url/">http://your-url/</a>api/AbpServiceProxies/GetAll?type=angular

  • 0
    dinhienhy created

    Thanks for your support. It worked!

  • 0
    g.adolph created

    The best way to find which name of your service is access url /api/AbpServiceProxies/GetAll?type=angular you will find all services.