mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
16 lines
445 B
TypeScript
16 lines
445 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');
|
|
}
|
|
};
|
|
});
|