Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to rename services based on convention #249

Closed
ltvan opened this issue Aug 28, 2016 · 2 comments
Closed

Need to rename services based on convention #249

ltvan opened this issue Aug 28, 2016 · 2 comments

Comments

@ltvan
Copy link

ltvan commented Aug 28, 2016

I'm working on a project which the service proxy is generated with the name like this: `abp.services.app.serviceName'
http://aspnetboilerplate.com/Pages/Documents/Dynamic-Web-API#DocAngularSupport

Currently I'm using a little hack:

var ngAnnotatePlugin = {
  init: function (ctx) {
    ctx.rename = {
      get: function (name) {
        if (/AppService$/.test(name)) {
          return 'abp.services.app.' + name.replace('AppService', '')
        }
        return name
      }
    }
  },
  match: function (node) {
  }
}

I'm looking for the ability to pass a callback/plugin to rename services.

Thanks.

@ltvan
Copy link
Author

ltvan commented Aug 28, 2016

Or, something like this is more convenient if we have some services which does not follow any convention:

/* @ngInject { userService: 'abp.services.app.user', something:'some-thing' } */

@olov
Copy link
Owner

olov commented Oct 1, 2016

#245

@olov olov closed this as completed Oct 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants