In trying to get the TypeScript Transformer to work, I've run into a peculiar problem.
I am trying to compile an app that uses **angular**, so my `BundleConfig` has this in it...
```
bundles.Add(new Bundle("~/bundles/js", new ScriptTransformer()) {
.Include("~/application/assets/js/angular.js")
});
bundles.Add(new Bundle("~/bundles/js/app", new ScriptTransformer()) {
.Include("~/application/angular/app.ts")
});
```
The `app.ts` page is very simple, it looks like this;
```
((): void => {
'use strict';
angular
.module('app', ['kendo.directives']);
})();
```
You don't really get much simpler than that. But when I try to run it, `BundleTransformer` tells me that `angular` is not defined.
This is problematic, because there are a lot of libraries that I, and others, need to use - does this mean that we cannot use BundleTransformer on anything that is not natively declared by the TypeScript library? I _do_ have `angularjs.d.ts` in my project, but it's a definition file, so you don't load it at runtime - even if you try to, it doesn't work.
Is there a way around this? I'd really like to use BundleTransformer, but if it can't understand the most rudimentary things like that, I'll be forced out of it unfortunately.
Comments: Hello, Ciel! You need to use the “reference” comments: ``` /// <reference path="../typings/angularjs.d.ts" /> ... ``` I recommend you to read the section [“Bundle Transformer: TypeScript”](https://bundletransformer.codeplex.com/wikipage?title=Bundle%20Transformer%3a%20TypeScript) of documentation. Also you would be useful to learn [tsd](https://github.com/DefinitelyTyped/tsd).
I am trying to compile an app that uses **angular**, so my `BundleConfig` has this in it...
```
bundles.Add(new Bundle("~/bundles/js", new ScriptTransformer()) {
.Include("~/application/assets/js/angular.js")
});
bundles.Add(new Bundle("~/bundles/js/app", new ScriptTransformer()) {
.Include("~/application/angular/app.ts")
});
```
The `app.ts` page is very simple, it looks like this;
```
((): void => {
'use strict';
angular
.module('app', ['kendo.directives']);
})();
```
You don't really get much simpler than that. But when I try to run it, `BundleTransformer` tells me that `angular` is not defined.
This is problematic, because there are a lot of libraries that I, and others, need to use - does this mean that we cannot use BundleTransformer on anything that is not natively declared by the TypeScript library? I _do_ have `angularjs.d.ts` in my project, but it's a definition file, so you don't load it at runtime - even if you try to, it doesn't work.
Is there a way around this? I'd really like to use BundleTransformer, but if it can't understand the most rudimentary things like that, I'll be forced out of it unfortunately.
Comments: Hello, Ciel! You need to use the “reference” comments: ``` /// <reference path="../typings/angularjs.d.ts" /> ... ``` I recommend you to read the section [“Bundle Transformer: TypeScript”](https://bundletransformer.codeplex.com/wikipage?title=Bundle%20Transformer%3a%20TypeScript) of documentation. Also you would be useful to learn [tsd](https://github.com/DefinitelyTyped/tsd).