diff --git a/.gitignore b/.gitignore index 54a0744..df4762f 100644 --- a/.gitignore +++ b/.gitignore @@ -238,6 +238,7 @@ _Pvt_Extensions # Generated output /bundles/ /components/ +/directives/ /ng2-bs3-modal.* src/**.*.js src/**.*.d.ts diff --git a/package.json b/package.json index 49bbb1f..d5e8ae9 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "scripts": { "peer": "npm install es6-promise@^3.0.2 es6-shim@^0.33.3 reflect-metadata@0.1.2 rxjs@5.0.0-beta.0 zone.js@0.5.14", "lint": "node ./node_modules/.bin/tslint ./src/**/*.ts", - "clean": "node ./node_modules/.bin/rimraf ./bundles/ ./components/ ./ng2-bs3-modal.js ./ng2-bs3-modal.d.ts", + "clean": "node ./node_modules/.bin/rimraf ./bundles/ ./components/ ./directives/ ./ng2-bs3-modal.js ./ng2-bs3-modal.d.ts", "tsc": "node ./node_modules/.bin/tsc --project . --declaration", "tsc-test": "node ./node_modules/.bin/tsc --project ./test", "tsc-single": "node ./node_modules/.bin/tsc --project . --rootDir ./src --module system --outFile ./bundles/ng2-bs3-modal.js", diff --git a/src/ng2-bs3-modal/directives/autofocus.ts b/src/ng2-bs3-modal/directives/autofocus.ts index a772820..6d6c6d5 100644 --- a/src/ng2-bs3-modal/directives/autofocus.ts +++ b/src/ng2-bs3-modal/directives/autofocus.ts @@ -1,10 +1,10 @@ -import { Directive, ElementRef, OnInit } from 'angular2/core'; +import { Directive, ElementRef } from 'angular2/core'; import { ModalComponent } from '../components/modal'; @Directive({ selector: '[autofocus]' }) -export class AutofocusDirective implements OnInit { +export class AutofocusDirective { constructor(private el: ElementRef, private modal: ModalComponent) { this.modal.onOpen.subscribe(() => { this.el.nativeElement.focus();