

(name) => "Hello " + name;function hello(name="World") { return "Hello " + name; } class Greeter { constructor(name) { this.name = name; } } module greeters { /* encapsulated code */ } var helloString = "Hello World"!;var helloArray = ["Hello World!"];function helloFunction(name) { return "Hello " + name + "!"; }
var helloString : string = "Hello World!";var helloArray : string[] = ["Hello World!"];function helloFunction(name : string) : string { return "Hello " + name + "!"; }
var helloString = "Hello World!";
var helloArray = ["Hello World!"];
function helloFunction(name) {
return "Hello " + name + "!";
}
//# sourceMappingURL=test.js.map




/// <reference path="types/angularjs/angular.d.ts"/>
/// <reference path="types/angularjs/angular-route.d.ts"/>
/// <reference path="types/restangular/restangular.d.ts"/>
Type definitions make Javascript type safe
interface IRouteProvider extends IServiceProvider {
otherwise(params: any): IRouteProvider;
when(path: string, route: IRoute): IRouteProvider;
}
interface IRoute {
controller?: any;
controllerAs?: any;
name?: string;
template?: string;
templateUrl?: any;
resolve?: any;
redirectTo?: any;
reloadOnSearch?: boolean;
}
angular.module("myApp", ["ngRoute", "restangular"])
.config(["$routeProvider",
($routeProvider: ng.route.IRouteProvider) => {
$routeProvider
.when("/", {
templateUrl: "views/main.html",
controller: "MainCtrl",
resolve: {
entries: ["Restangular", (Restangular: Restangular) => {
return Restangular.all("entries").getList();
}]
}
})
.otherwise("/")
}]);
class MainCtrl { constructor(private $scope, public entries: ArrayRest<IEntryRest>) { $scope.vm = this; } // ... public upvote(entry: IEntryRest) { // POST on /entries/:entryId/upvote entry.post("upvote", {}).then((updatedEntry: IEntryRest) => { entry.votes = updatedEntry.votes; }); } }angular.module("myApp").controller('MainCtrl', ['$scope', 'entries', MainCtrl]);

$ grunt test$ grunt server$ grunt build$ grunt deploy



var config: Config;
//@@config;
angular.module('labs.common.services').constant('config', config);
<!-- build:js({.tmp,app}) scripts/scripts.js -->
<script src="scripts/app.js"></script>
<script src="scripts/controllers/controllerA.js"></script>
<script src="scripts/services/serviceB.js"></script>
<!-- endbuild -->
var folder=timestamp + "-" + git_commit_hash
params: { Cache-Control: max-age=300 }
If you need to depend on the latest version append the git commit hash to the url to avoid breaking future builds
Setting up the Gruntfile can take time but it's well worth it as it can automate a lot of your workflow
Use npm shrinkwrap to manage your dependencies> npm shrinkwrap
Switch to the EU npmjs registry mirror
npm --registry http://registry.npmjs.eu/ install
npm set registry http://registry.npmjs.eu/