I got my hands on the Typescript + AngularJS example downloaded from this source:
The issue I'm facing is that whenever I compile it using Visual Studio, the references don't seem to be compiled properly. However, if I utilize the command prompt with the tsc --out
parameter, everything works as expected.
I am confused about what mistake I might be making here. The example uses a reference file named _all.ts
. Could there be an issue with that? I've attempted moving this file to the root folder or renaming it, but have had no success.
Code for ApplicationJs:
/// <reference path="_all.ts" />
/**
* The main TodoMVC app module.
*
* @type {angular.Module}
*/
module todos {
'use strict';
var todomvc = angular.module('todomvc', [])
.controller('todoCtrl', TodoCtrl)
.directive('todoBlur', todoBlur)
.directive('todoFocus', todoFocus)
.service('todoStorage', TodoStorage);
}
Code for _all.ts
/// <reference path='js/libs/jquery/jquery.d.ts' />
/// <reference path='js/libs/angular/angular.d.ts' />
/// <reference path='js/models/TodoItem.ts' />
... (rest of the code omitted for brevity)
When compiling with Visual Studio:
/// <reference path="_all.ts" />
... (rest of the code omitted for brevity)
But when using tsc --out:
/// <reference path='../../_all.ts' />
... (rest of the code omitted for brevity)