I just started working with TypEcs, and I'm trying to create a webpage in Typescript and AngularJS, which I want to debug in Eclipse.
- Is it possible to debug a Typescript and Angular page in Eclipse? If so, can you steer me in the right direction?
I tried to debug a single Typescript file with the Typescript Standalone parameter and it works. But I also want to use AngularJS. I created the index.html file and the app.ts file. I also imported angular.d.ts and angular.min.js, among others, into the script folder. Can I do this using any of the TypEcs Typescript debuggers? I tried to run it, but I get an error message in var app = angular.module ... (ReferenceError: Angular not defined).
I assume that the angular.min.js file that I reference in the index file was not loaded. Is it because app.ts is set as the main file in a stand-alone Typescript configuration? (I cannot select index.html) And / Or am I missing code / settings?
I hope you help me. Thank you in advance!
Here is a sample code: index.html:
<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); }
source share