當我使用angular2代碼時,我經常需要看到實現的一個類,比如說Router
類。獲取Angular 2.ts文件而不是.d.ts文件
如果我點擊我的IDE WebStorm中的Router
類型, G。另一個類的構造函數中
export class myClass {
constructor(private router: Router) {}
// ...
}
我的IDE帶我到打字稿定義文件router.d.ts
我node_modules
文件夾內。我想要的是帶我到路由器類的實現的原始router.ts
文件,而不僅僅是它的定義。
當您從github通過Angular2快速入門中建議的standard package.json獲取angular2時,原始.ts
文件不包含在node_modules
文件夾結構中。目前,我必須查詢the official github repo中的原始代碼。
任何想法如何讓.ts
文件進入我的node_modules/@angular
文件夾而不是.d.ts
文件?
,謝謝,我已經試過在瀏覽器的調試,但它仍然顯示'.js'文件而不是'ts'。它還在爲你工作嗎? –