[英]Navigating to Angular Sourcecode in VisualStudio?
In my Angular app sourcecode (built using node), I use some type from Angular itself eg like this: 在我的Angular应用程序源代码(使用node构建)中,我使用了Angular本身的某种类型,例如:
import {HashLocationStrategy} from '@angular/common';
When I now try to navigate to the HashLocationStrategy
Angular type in VisualStudio, eg by choosing "Go to definition" from the context menu, I end up in the file node_modules/@angular/common/src/location/hash_location_strategy.d.ts
. 现在,当我尝试导航至VisualStudio中的
HashLocationStrategy
Angular类型时,例如通过从上下文菜单中选择“转到定义”,我最终进入文件node_modules/@angular/common/src/location/hash_location_strategy.d.ts
。 That file is only a Declaration File , containing only the type signatures and not the actual implementation itself. 该文件只是一个声明文件 ,仅包含类型签名,而不包含实际的实现本身。
How can I navigate to the actual sourcecode of HashLocationStrategy
? 如何导航到
HashLocationStrategy
的实际源代码?
Why do you want to navigate to the Source File? 为什么要导航到源文件?
Though, parallel to the .d.ts file you will have a .js file which consist of the JavaScript version of the Source Code.
但是,与.d.ts文件并行,您将拥有一个.js文件,其中包含源代码的JavaScript版本。
If you want to explore .ts version, you can explore it here, https://github.com/angular/angular/blob/5.0.5/packages/common/src/location/hash_location_strategy.ts#L15-L88 如果要浏览.ts版本,可以在这里浏览, https://github.com/angular/angular/blob/5.0.5/packages/common/src/location/hash_location_strategy.ts#L15-L88
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.