diff --git a/types/angular-material/angular-material-tests.ts b/types/angular-material/angular-material-tests.ts index 8d6955c697..ad79cff2db 100644 --- a/types/angular-material/angular-material-tests.ts +++ b/types/angular-material/angular-material-tests.ts @@ -164,8 +164,7 @@ myApp.controller('DialogController', ($scope: TestScope, $mdDialog: ng.material. .controller(function TestController(param) { }) .controller(class { }) .controller(['fakeService', function TestController(fake) { }]) - .controller(['fakeService', class { }]) - ; + .controller(['fakeService', class { }]); const dialogOptions: ng.material.IDialogOptions = {}; @@ -389,3 +388,11 @@ myApp.controller('PanelController', ($scope: TestScope, $mdPanel: ng.material.IP $mdPanel.newPanelAnimation().openFrom({ top: 0, left: 0 }); }; }); + +myApp.controller('StickyController', ($scope: TestScope, $mdSticky: ng.material.IStickyService) => { + const stickyElement = angular.element(new Element()); + const cloneStickyElement = stickyElement.clone(); + + $mdSticky($scope, stickyElement); + $mdSticky($scope, stickyElement, cloneStickyElement); +}); diff --git a/types/angular-material/index.d.ts b/types/angular-material/index.d.ts index 92f6d46751..d77f5ae7ce 100644 --- a/types/angular-material/index.d.ts +++ b/types/angular-material/index.d.ts @@ -494,5 +494,7 @@ declare module 'angular' { interface IProgressCircularProvider { configure(options: IProgressCircularConfig): void; } + + type IStickyService = (scope: IScope, element: JQuery, elementClone?: JQuery) => void; } }