在Angular Component Router文档中,我偶然发现了一个我从未见过的npm命令,我不明白发生了什么:
npm install @angular/router --save
Run Code Online (Sandbox Code Playgroud)
是什么意思@angular/router?
整个字符串是包名吗?但是当我在npmjs.com上使用搜索时,我找不到那个包.并且命令行搜索确实没有返回这样的包:
npm search @angular/router
:No match found for "@angular/router"
Run Code Online (Sandbox Code Playgroud)
那么@angular/npm中的某种前缀机制呢?它是如何工作的?
例如:
import Component from '@/components/component'
Run Code Online (Sandbox Code Playgroud)
在我看到的代码中,它的行为类似于../相对于文件路径的目录中的一个级别,但我想更一般地了解它的作用.遗憾的是,由于符号搜索问题,我无法在线找到任何文档.
开头的依赖项有什么不同@吗?
这是意味着还是暗示某些东西?我没有看到任何关于此的信息.看看我的node_modules文件夹:

Fortawesome以@并且不包含典型fortawesome.css文件开头.那是一样的吗?或者是否@表明了什么?
这是我的package.json:
{
"name": "ng-frontend",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build --prod",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^5.2.0",
"@angular/common": "^5.2.0",
"@angular/compiler": "^5.2.0",
"@angular/core": "^5.2.0",
"@angular/forms": "^5.2.0",
"@angular/http": "^5.2.0",
"@angular/platform-browser": "^5.2.0",
"@angular/platform-browser-dynamic": "^5.2.0",
"@angular/router": "^5.2.0",
"@fortawesome/fontawesome": "^1.1.4",
"animate.css": "^3.6.1",
"bootstrap": "^4.0.0",
"core-js": "^2.4.1",
"jasny-bootstrap": "^3.1.3",
"jquery": "^3.3.1",
"popper.js": …Run Code Online (Sandbox Code Playgroud) 在我的“ package.json”文件中,似乎所有Angular缺陷都以@为前缀。这是什么意思?例如
"dependencies": {
"@angular/common": "2.0.0-rc.5",
Run Code Online (Sandbox Code Playgroud)
为什么不像下面这样,没有@?
"dependencies": {
"angular/common": "2.0.0-rc.5",
Run Code Online (Sandbox Code Playgroud)