'Can we do logging in .config inside application module in angularJS?

So I was trying to inject $log in config() module in application.ts

.config(['$log',($log: angular.ILogService): void => { ...} // Unknown provider: $log

Can we inject dependencies in config() like this? What am I doing wrong?

Read this post : AngularJS Provider dependency injection - using $log in provider but it's about injection Dependencies using provider



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source