Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试在角度应用程序中创建变量链接。如果它是移动的,它将在新选项卡中打开 href。如果是桌面,它将在弹出窗口中打开。因此,我试图调用 Angular 提供的 $location 变量,但无法确定调用它。我在哪里/如何初始化这个变量的使用?