我的问题是在gulp编译期间出错:
错误TS6053:找不到文件'/Users/myname/dev2/test2/typings/angularjs/angular.d.ts'.
但该文件确实存在!如果我复制foo文件夹中的d.ts文件,它将起作用.但这不是一种有效的方式.我如何定义有效的参考?并非项目绝对路径可能吗?
路径:
source/modules/foo/controller.ts
typings/..
Run Code Online (Sandbox Code Playgroud)
controller.ts:
/// <reference path="../../../typings/angularjs/angular.d.ts" />
module('app').controller("fooController",
[ "$scope",
($scope)
=> new Application.Controllers.fooController($scope)
]);
module Application.Controllers{
export class fooController{
constructor( $scope ){
$scope.name = 'I am foo Hans';
}
}
}
Run Code Online (Sandbox Code Playgroud)