I have a class with two method. I need to execute the first at the app bootstrap and the second few times during the application live.
My class:
import { Profile } from './Profile';
class Profilatura {
public profile: Profile;
/** @ngInject */
first($http: angular.IHttpService): void{
.......
this.profile = ...;
.......
}
public second(): Profile{
return this.profile;
}
}
In my app module:
import { ProfilaturaService } from './profilatura/ProfilaturaService';
angular.module('App')
.run(function runBlock($http: angular.IHttpService) {
Profilatura.first($http);
})
....
Why I get Property 'first' doesn't exist on type typeof?????