I recently dove into the world of TypEcs and am currently working on developing a webpage using Typescript and AngularJS that I'd like to debug in Eclipse.
- Is it feasible to debug a TypeScript and Angular page in Eclipse? If so, could you provide me with some guidance on how to achieve this?
I attempted to debug a single TypeScript file with the TypeScript Standalone option and it was successful. However, I also want to incorporate AngularJS into the mix. I've set up an index.html file and an app.ts file, along with importing angular.d.ts and angular.min.js into a script folder. Is there a way to do this using any of the TypEcs TypeScript debuggers? I've attempted to run it, but I encountered an error at var app = angular.module... (ReferenceError: angular is not defined).
I suspect that the angular.min.js file linked in the index file hasn't been loaded. Could this be due to app.ts being set as the main file in the TypeScript Standalone configuration? (As I'm unable to select the index.html) Are there any missing code or settings?
Your assistance would be greatly appreciated. Thank you in advance!
Below is an example of the code:
<html ng-app="helloworld">
<head>
<title>Hello World!</title>
</head>
<body>
<div class="container" ng-controller="HelloWorldCtrl">
<input type="text" class="form-control" value="{{message}}" />
</div>
<script src="../scripts/angular.min.js"></script>
<script src="app.js"></script>
</body>
</html>
app.ts:
/// <reference path="../scripts/typings/angularjs/angular.d.ts"/>
module Sample.HelloWorld {
export interface IHelloWorldScope extends ng.IScope {
message: string;
}
export class HelloWorldCtrl {
static $inject = ["$scope"];
constructor(private scope: IHelloWorldScope) {
scope.message = "Hello World";
}
}
var app = angular.module("helloworld",["ui.bootstrap"]);
app.controller("HelloWorldCtrl", HelloWorldCtrl);
}