I'm currently facing an issue with my AngularJS code. Here is a snippet of what I have:
this.$injector.get('$state').current.name !== 'login'
But, it's giving me the following error message:
error TS2339: Property 'current' does not exist on type '{}'.
Any suggestions on how to resolve this error?
UPDATE
I attempted the following solution:
export namespace NewInjector extends angular.auto.IInjectorService {
current: any;
};
Unfortunately, it did not work as expected.