Skip to content

Instantly share code, notes, and snippets.

@andreasderuiter
Last active January 6, 2016 13:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andreasderuiter/05c11f9f13b82a012683 to your computer and use it in GitHub Desktop.
Save andreasderuiter/05c11f9f13b82a012683 to your computer and use it in GitHub Desktop.
module App {
"use strict";
interface IMyAppDirective extends ng.IDirective {
}
interface IMyAppDirectiveScope extends ng.IScope {
}
interface IMyAppDirectiveAttributes extends ng.IAttributes {
}
MyAppDirective.$inject = ["$window"];
function MyAppDirective($window: ng.IWindowService): IMyAppDirective {
return {
restrict: "EA",
link: link,
template: "<h1>Hello, world</h1>"
}
function link(scope: IMyAppDirectiveScope, element: ng.IAugmentedJQuery, attrs: IMyAppDirectiveAttributes) {
}
}
angular.module("app").directive("myApp", MyAppDirective);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment