Skip to content

Instantly share code, notes, and snippets.

@breeze4
Created August 27, 2015 21:35
Show Gist options
  • Save breeze4/f8e9c95b6b808c08f032 to your computer and use it in GitHub Desktop.
Save breeze4/f8e9c95b6b808c08f032 to your computer and use it in GitHub Desktop.
var module = angular.module('mySubModule', ['someModule']);
module.controller('MyController', ['someService', function MyController(someService) {
var self = this;
self.coolFun = function() {
self.someVar = 'x';
someService.otherFunction();
}
}]);
module svcorder.MySubModule {
class MyController {
static $inject = [
'someService'
];
public someVar:string;
private someService;
constructor(someService) {
this.someService = someService;
}
coolFun() {
this.someVar = 'x';
this.someService.otherFunction();
}
}
svcorderModule.controller('MyController', MyController);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment