Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sjkp/vs2015-cordova-typescript-problems
https://github.com/sjkp/vs2015-cordova-typescript-problems
Last synced: 8 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/sjkp/vs2015-cordova-typescript-problems
- Owner: sjkp
- Created: 2015-06-29T15:28:31.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-06-29T15:31:55.000Z (over 9 years ago)
- Last Synced: 2024-04-15T02:56:05.684Z (7 months ago)
- Language: HTML
- Size: 609 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vs2015-cordova-typescript-problems
Sample project illustrating issues with typescript support for cordova apps in VS 2015.1) The way appbundle.js I created is not great, in my sample project you will see that appbundle contains the code from app.ts before the code from controller.ts, this makes the code not work, when run because App.TestController is undefined when called. If I change the name of app.ts to e.g. xapp.ts, in other words something that comes after the controller.ts alphabetically it will work, but that is not a way to organize things in a large project.
```javascript
(function (App) {
var app = angular.module("test", []);
app.controller("TestController", App.TestController);
})(App || (App = {}));
var App;
(function (App) {
var TestController = (function () {
function TestController($scope) {
$scope.text = "hello";
}
return TestController;
})();
App.TestController = TestController;
})(App || (App = {}));
```
2) The appbundle.js.map that gets generated contains source map references to files in accordance with their location in the visual studio project. "sources":["../../scripts/controllers.ts" this is useless in the browser (Ripple debugging), because the appbundle.js.map file should be used by the browser to map to the ts-files when hosted by the server. Currently e.g. chrome will show empty ts files because they are not at the correct locations (they are not even copied to the platform/android/asset/www folder, which I believe is used when ripple debugging is used). The result is that you are forced to do javascript debugging inside the appbundle.js files, which can get gigantic.