mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-09-02 15:20:32 +00:00
16 lines
443 B
TypeScript
16 lines
443 B
TypeScript
import * as angular from "angular";
|
|
import {ClipboardService} from "angular-clipboard";
|
|
|
|
interface TestScope extends ng.IScope {
|
|
[index: string]: any;
|
|
}
|
|
|
|
const app = angular.module('testModule', ['angular-clipboard']);
|
|
app.controller('TestController', ($scope: TestScope, clipboard: ClipboardService) => {
|
|
$scope['testCopy'] = () => {
|
|
if (clipboard.supported) {
|
|
clipboard.copyText('hiiiiiii');
|
|
}
|
|
};
|
|
});
|