【问题标题】:Where is the Angular's definitions file so I can reference it in my VS2015 ASP.NET 5 project?Angular 的定义文件在哪里,以便我可以在我的 VS2015 ASP.NET 5 项目中引用它?
【发布时间】:2016-01-04 20:43:18
【问题描述】:

This SO 问题适用于 ASP.Net 4.5。我追求的是 ASP.Net 5。

从 NuGet 下载 angularjs.TypeScript.DefinitelyTyped 后,我想将 .ts 文件添加到我的项目中,并引用 angular 的定义文件,即使用

的引用

/// <reference path="???/angular.d.ts"/>

但我不知道在 '???' 中写什么部分...

我错过了什么?

【问题讨论】:

    标签: angularjs typescript visual-studio-2015


    【解决方案1】:

    但我不知道在 '???' 中写什么部分

    建议您在新项目中使用tsconfig.json 而不是引用标签。 https://github.com/Microsoft/TypeScript/wiki/tsconfig.json

    【讨论】:

    • 我已经在使用 .tsconfig,但是编译器无法识别“angular”。这就是为什么我需要以某种方式引用它..
    • angular.d.ts 添加到files 列表中
    猜你喜欢
    • 1970-01-01
    • 2016-10-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-06-02
    • 1970-01-01
    • 2018-01-19
    相关资源
    最近更新 更多