Last active
January 6, 2016 13:03
-
-
Save andreasderuiter/05c11f9f13b82a012683 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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