Skip to content

Commit

Permalink
feat(compile): support AoT
Browse files Browse the repository at this point in the history
use module ES6 instead of commonjs
  • Loading branch information
maxisam committed Dec 16, 2016
1 parent 5d7a65a commit 0892340
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/clipboard.directive.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Directive, ElementRef, Input, Output, EventEmitter, OnInit, OnDestroy } from '@angular/core';
import Clipboard = require('clipboard');
import { Directive, ElementRef, Input, Output, EventEmitter, OnInit, OnDestroy } from '@angular/core';
import * as Clipboard from 'clipboard';

@Directive({
selector: '[ngIIclipboard]'
Expand All @@ -18,7 +18,7 @@ export class ClipboardDirective implements OnInit, OnDestroy {
constructor(private elmRef: ElementRef) { }

ngOnInit() {
let option: ClipboardOptions;
let option: Clipboard.Options;
option = !!this.targetElm ? { target: () => <any>this.targetElm } : { text: () => this.cbContent };
this.clipboard = new Clipboard(this.elmRef.nativeElement, option);
this.clipboard.on('success', () => this.onSuccess.emit(true));
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"es6",
"dom"
],
"module": "commonjs",
"module": "es6",
"moduleResolution": "node",
"noEmitOnError": false,
"noImplicitAny": false,
Expand Down

0 comments on commit 0892340

Please sign in to comment.