Angularjs geolocation working on browser but not on phone

I added a dependency to get the latitude and longitude of my location, it does work for my browser but when I build on an Android device, it doesn’t work. I want my app to get the location of the mobile device.