Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

angular injector with asp.net Boilerplate

In http://www.aspnetboilerplate.com/Pages/Documents/Dynamic-Web-API.. How does string 'abp.services.tasksystem.task' get resolved?

I know the $injector resolve the string.. but how can we come up with string 'abp.services.tasksystem.task' ?

like image 741
user384080 Avatar asked Oct 31 '22 19:10

user384080


1 Answers

In order to use the auto-generated proxy services in angularjs, you have to include this file:

<script src="~/api/AbpServiceProxies/GetAll?type=angular"></script>

It will register all the proxy services as angular's services into an abp module.

The content of the file might look like this:

angular.module('abp').service('abp.services.tasksystem.task', function () {
  // the proxy implementation
});

That why you will be able to inject the abp.services.tasksystem.task service in your app.

PS. Note that those . dot-notation are just a service name, not a real namespace thing.

like image 71
runTarm Avatar answered Nov 15 '22 07:11

runTarm