aspnetboilerplate: Can't use abp services in typescript
Hi
I’ve seen that #813 has been merged in, and shouldn’t it already be available?
Because, I can’t seem to figure out, why I can’t get my services to work in my typescript file, as I already commented about in the pull-request:
It’s working fine in JS files, no problems there.
@iyhammad @RonFrick Is it possible that either of you, could provide a gist with the implementation of apb services in typescript?
I cant seem to get it working, by following either of your examples.
export class DietplanController {
//private todos: TodoItem[];
// $inject annotation.
// It provides $injector with information about dependencies to be injected into constructor
// it is better to have it close to the constructor, because the parameters must match in count and type.
// See http://docs.angularjs.org/guide/di
public static $inject = [
'$scope',
'$http',
'alertService',
'abp.services.app.dietplan'
];
// dependencies are injected via AngularJS $injector
// controller's name is registered in Application.ts and specified from ng-controller attribute in index.html
constructor(
private $scope: IDietplanScope,
private $http: ng.IHttpService,
private $alertService: AlertService,
private dietplanService: abp.services.app.dietplan
) {
in the constructor, it cant find “abp”.
Kind regards
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 15 (10 by maintainers)
Worthy7 I am going to try hooking nswag up, using the command line to see what output I can get. I will let you know what I find.
Halil, The problem we are having as a team writing typescript, is when other people make changes to the app services and update the definition file it causes our build server to fail. It’s a catch 22 when the typescript generation depends on the web project successfully building, but the web fails because the typescript definition has changed.
If we could update our typescript definitions for the app service without an endpoint, then it would solve our issue, and I believe it will solve what worth7 is needing.
As a side note I absolutely love having our app service generated along with all of our dtos. It saves so much time and getting new devs up to speed has been a great feature. I would not want to go back to doing everything by hand. We just have this one problem when working as a group.
Thanks again for everything you have put together.