I'm trying to create a variable link in an angular app. If it is mobile, it will open the href in a new tab. If it is desktop, it will open in a popup. As such, I am trying to invoke the $location variable provided by Angular, but cannot figure out to invoke it. Where/how do I initialize the use of this variable?