Skip to content

Instantly share code, notes, and snippets.

@pichsenmeister
Last active December 21, 2015 03:49
Show Gist options
  • Save pichsenmeister/6244773 to your computer and use it in GitHub Desktop.
Save pichsenmeister/6244773 to your computer and use it in GitHub Desktop.
angularJS and typescript controller
/// <reference path='../_all.ts' />
module angularTs {
'use strict';
export interface IFirstScope extends ng.IScope {
vm: FirstCtrl;
}
export class FirstCtrl {
private member: number;
private http: any;
public injection(): any[] {
return [
'$scope',
'$http',
FirstCtrl
]
}
constructor($scope: IFirstScope, $http: IHttpService) {
$scope.vm = this;
this.http = $http;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment