Updated: starter
This commit is contained in:
22
components/file-upload/file-select.ts
Normal file
22
components/file-upload/file-select.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
/// <reference path="../../tsd.d.ts" />
|
||||
|
||||
import {
|
||||
Component, View,
|
||||
Directive, LifecycleEvent,
|
||||
EventEmitter, ElementRef, Renderer,
|
||||
CORE_DIRECTIVES, FORM_DIRECTIVES, NgClass
|
||||
} from 'angular2/angular2';
|
||||
|
||||
@Directive({
|
||||
selector: '[ng2-file-select]',
|
||||
properties: ['config: ng2FileSelect']
|
||||
})
|
||||
export class FileSelect {
|
||||
public config:any = {};
|
||||
|
||||
constructor(private element:ElementRef, private renderer:Renderer) {
|
||||
console.log('it works!');
|
||||
}
|
||||
}
|
||||
|
||||
export const fileUpload:Array<any> = [FileSelect];
|
||||
4
components/file-upload/readme.md
Normal file
4
components/file-upload/readme.md
Normal file
@@ -0,0 +1,4 @@
|
||||
### Usage
|
||||
```typescript
|
||||
import {fileUpload} from 'ng2-file-upload';
|
||||
```
|
||||
3
components/index.ts
Normal file
3
components/index.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
///<reference path="../tsd.d.ts"/>
|
||||
|
||||
export * from './file-upload/file-select';
|
||||
3
components/module.ts
Normal file
3
components/module.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
declare module 'ng2-file-upload' {
|
||||
export * from 'index';
|
||||
}
|
||||
Reference in New Issue
Block a user