Critical dependencies - the request of a dependency is an expression Webpack

I am using a service in my angular application to create uibModal as follows function modal(modalConfig){ var modalInstance = $uibModal.open({ animation: true, ...