diff --git a/README.md b/README.md index c0235dbe..02f6a151 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ npm install ng2-uploader `component.ts` ````typescript -import {Component} from 'angular2/core'; +import {Component} from '@angular/core'; import {UPLOAD_DIRECTIVES} from 'ng2-uploader/ng2-uploader'; @Component({ @@ -64,7 +64,7 @@ Response: {{ uploadFile | json }} `component.ts` ````typescript -import {Component} from 'angular2/core'; +import {Component} from '@angular/core'; import {UPLOAD_DIRECTIVES} from 'ng2-uploader/ng2-uploader'; @Component({ @@ -105,7 +105,7 @@ Response:
{{ uploadedFiles | json }} `component.ts` ````typescript -import {Component, NgZone} from 'angular2/core'; +import {Component, NgZone} from '@angular/core'; import {UPLOAD_DIRECTIVES} from 'ng2-uploader/ng2-uploader'; @Component({ @@ -175,7 +175,7 @@ Response:
{{ uploadFile | json }} `component.ts` ````typescript -import {Component, NgZone} from 'angular2/core'; +import {Component, NgZone} from '@angular/core'; import {UPLOAD_DIRECTIVES} from 'ng2-uploader/ng2-uploader'; @Component({ @@ -245,7 +245,7 @@ export class MultipleProgressbar { `component.ts` ````typescript -import {Component} from 'angular2/core'; +import {Component} from '@angular/core'; import {UPLOAD_DIRECTIVES} from 'ng2-uploader/ng2-uploader'; @Component({ @@ -289,7 +289,7 @@ You may want to sent file with specific form field name. For that you can use op `component.ts` ````typescript -import {Component} from 'angular2/core'; +import {Component} from '@angular/core'; import {UPLOAD_DIRECTIVES} from 'ng2-uploader/ng2-uploader'; @Component({ diff --git a/make.js b/make.js index a5fc7e1c..2a486e89 100644 --- a/make.js +++ b/make.js @@ -11,15 +11,15 @@ var config = { module: 'cjs' }, map: { - typescript: './node_modules/typescript/lib/typescript.js', - angular2: path.resolve('node_modules/angular2'), - rxjs: path.resolve('node_modules/rxjs') + "typescript": './node_modules/typescript/lib/typescript.js', + "@angular": path.resolve('node_modules/@angular'), + "rxjs": path.resolve('node_modules/rxjs') }, paths: { '*': '*.js' }, meta: { - 'node_modules/angular2/*': { build: false }, + 'node_modules/@angular/*': { build: false }, 'node_modules/rxjs/*': { build: false } }, }; @@ -33,4 +33,4 @@ builder }) .catch(function(err) { console.log('Error', err); -}); \ No newline at end of file +}); diff --git a/package.json b/package.json index 07fa57a4..e9b67291 100644 --- a/package.json +++ b/package.json @@ -21,16 +21,20 @@ "uploader" ], "dependencies": { - "angular2": "^2.0.0-beta.13", - "clang-format": "^1.0.35", - "es6-promise": "^3.0.2", - "es6-shim": "^0.35.0", - "reflect-metadata": "0.1.2", - "rxjs": "5.0.0-beta.2", - "systemjs": "0.19.20", - "zone.js": "^0.6.9" + "@angular/core": "2.0.0-rc.1", + "@angular/common": "2.0.0-rc.1", + "@angular/compiler": "2.0.0-rc.1", + "clang-format": "^1.0.39", + "es6-promise": "^3.2.1", + "es6-shim": "^0.35.1", + "reflect-metadata": "0.1.3", + "rxjs": "5.0.0-beta.6", + "systemjs": "0.19.26", + "zone.js": "^0.6.12" }, "devDependencies": { - "systemjs-builder": "^0.15.14" + "systemjs-builder": "^0.15.14", + "typescript": "1.8.10", + "typings": "^0.8.1" } } diff --git a/src/directives/ng-file-drop.d.ts b/src/directives/ng-file-drop.d.ts index d35f0ec1..a904bca4 100644 --- a/src/directives/ng-file-drop.d.ts +++ b/src/directives/ng-file-drop.d.ts @@ -1,4 +1,4 @@ -import { ElementRef, EventEmitter } from 'angular2/core'; +import { ElementRef, EventEmitter } from '@angular/core'; import { Ng2Uploader } from '../services/ng2-uploader'; export declare class NgFileDrop { el: ElementRef; diff --git a/src/directives/ng-file-drop.ts b/src/directives/ng-file-drop.ts index 98c9fe4f..ff717a53 100644 --- a/src/directives/ng-file-drop.ts +++ b/src/directives/ng-file-drop.ts @@ -1,4 +1,4 @@ -import {Directive, ElementRef, EventEmitter} from 'angular2/core'; +import {Directive, ElementRef, EventEmitter} from '@angular/core'; import {Ng2Uploader} from '../services/ng2-uploader'; @Directive({ diff --git a/src/directives/ng-file-select.d.ts b/src/directives/ng-file-select.d.ts index 4f290793..5a851377 100644 --- a/src/directives/ng-file-select.d.ts +++ b/src/directives/ng-file-select.d.ts @@ -1,4 +1,4 @@ -import { ElementRef, EventEmitter } from 'angular2/core'; +import { ElementRef, EventEmitter } from '@angular/core'; import { Ng2Uploader } from '../services/ng2-uploader'; export declare class NgFileSelect { el: ElementRef; diff --git a/src/directives/ng-file-select.ts b/src/directives/ng-file-select.ts index 65d85fcd..15db148b 100644 --- a/src/directives/ng-file-select.ts +++ b/src/directives/ng-file-select.ts @@ -1,4 +1,4 @@ -import {Directive, ElementRef, EventEmitter} from 'angular2/core'; +import {Directive, ElementRef, EventEmitter} from '@angular/core'; import {Ng2Uploader} from '../services/ng2-uploader'; @Directive({ diff --git a/src/services/ng2-uploader.d.ts b/src/services/ng2-uploader.d.ts index 869d4e80..4cfbe135 100644 --- a/src/services/ng2-uploader.d.ts +++ b/src/services/ng2-uploader.d.ts @@ -1,4 +1,4 @@ -import { EventEmitter } from 'angular2/core'; +import { EventEmitter } from '@angular/core'; export declare class Ng2Uploader { url: string; cors: boolean; diff --git a/src/services/ng2-uploader.ts b/src/services/ng2-uploader.ts index 738d37ce..118fab89 100644 --- a/src/services/ng2-uploader.ts +++ b/src/services/ng2-uploader.ts @@ -1,4 +1,4 @@ -import {Injectable, EventEmitter} from 'angular2/core'; +import {Injectable, EventEmitter} from '@angular/core'; class UploadedFile { id: string; diff --git a/tsconfig.json b/tsconfig.json index 04899786..e45a2e3c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,7 +15,9 @@ }, "files": [ "ng2-uploader.ts", - "node_modules/angular2/typings/browser.d.ts" + "typings/browser/ambient/es6-collections/index.d.ts", + "typings/browser/ambient/es6-promise/index.d.ts" + ], "exclude": [ "node_modules" diff --git a/typings.json b/typings.json new file mode 100644 index 00000000..b6e354a8 --- /dev/null +++ b/typings.json @@ -0,0 +1,6 @@ +{ + "ambientDependencies": { + "es6-collections": "registry:dt/es6-collections#0.5.1+20160316155526", + "es6-promise": "registry:dt/es6-promise#0.0.0+20160423074304" + } +}