Skip to content

Instantly share code, notes, and snippets.

@vespertilian
Created March 3, 2016 19:27
Show Gist options
  • Save vespertilian/2130cd68cdbfa60c402b to your computer and use it in GitHub Desktop.
Save vespertilian/2130cd68cdbfa60c402b to your computer and use it in GitHub Desktop.
Angular 1.5 Component Typescript Definition for use with webpack
var ngModule = angular.module('app',[]);
// be sure to call new
ngModule
.component('login', new login())
var templateUrl = require('./login.html');
export class login implements ng.IComponentOptions {
public templateUrl: string;
public bindings: any;
public controller: any;
constructor() {
this.bindings = {};
this.controller = LoginController;
this.templateUrl = templateUrl;
}
}
class LoginController {
constructor(){
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment