Updating to RC6
This commit is contained in:
12
components/file-upload/file-upload.module.ts
Normal file
12
components/file-upload/file-upload.module.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { NgModule } from '@angular/core';
|
||||
|
||||
import { FileDropDirective } from './file-drop.directive';
|
||||
import { FileSelectDirective } from './file-select.directive';
|
||||
|
||||
@NgModule({
|
||||
imports: [CommonModule],
|
||||
declarations: [FileDropDirective, FileSelectDirective],
|
||||
exports: [FileDropDirective, FileSelectDirective]
|
||||
})
|
||||
export class FileUploadModule { }
|
||||
34
demo/app.component.ts
Normal file
34
demo/app.component.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import {Component} from '@angular/core';
|
||||
|
||||
let gettingStarted = require('./getting-started.md');
|
||||
|
||||
@Component({
|
||||
selector: 'app',
|
||||
template: `
|
||||
<main class="bd-pageheader">
|
||||
<div class="container">
|
||||
<h1>ng2-file-upload</h1>
|
||||
<p>The Angular2 File Upload directives</p>
|
||||
<a class="btn btn-primary" href="https://github.com/valor-software/ng2-file-upload">View on GitHub</a>
|
||||
<div class="row">
|
||||
<div class="col-lg-1"><iframe src="https://ghbtns.com/github-btn.html?user=valor-software&repo=ng2-file-upload&type=star&count=true" frameborder="0" scrolling="0" width="170px" height="20px"></iframe></div>
|
||||
<div class="col-lg-1"><iframe src="https://ghbtns.com/github-btn.html?user=valor-software&repo=ng2-file-upload&type=fork&count=true" frameborder="0" scrolling="0" width="170px" height="20px"></iframe></div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<div class="container">
|
||||
<section id="getting-started">${gettingStarted}</section>
|
||||
|
||||
<file-upload-section class="col-md-12"></file-upload-section>
|
||||
</div>
|
||||
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
<p class="text-muted text-center"><a href="https://github.com/valor-software/ng2-file-upload">ng2-file-upload</a> is maintained by <a href="https://github.com/valor-software">valor-software</a>.</p>
|
||||
</div>
|
||||
</footer>
|
||||
`
|
||||
})
|
||||
export class DemoComponent {
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
import {Component} from '@angular/core';
|
||||
import {CORE_DIRECTIVES} from '@angular/common';
|
||||
|
||||
import {TAB_DIRECTIVES} from 'ng2-bootstrap/ng2-bootstrap';
|
||||
import {SimpleDemoComponent} from './file-upload/simple-demo';
|
||||
|
||||
let name = 'File Upload';
|
||||
@@ -19,10 +17,10 @@ let tabDesc:Array<any> = [
|
||||
let tabsContent:string = ``;
|
||||
tabDesc.forEach((desc:any) => {
|
||||
tabsContent += `
|
||||
<tab heading="${desc.heading}" (select)="select($event)">
|
||||
<tab [heading]="desc.heading" (select)="select($event)">
|
||||
<div class="card card-block panel panel-default panel-body">
|
||||
|
||||
<${desc.heading.toLowerCase()}-demo *ngIf="currentHeading === '${desc.heading}'"></${desc.heading.toLowerCase()}-demo>
|
||||
<{{desc.heading.toLowerCase()}}-demo *ngIf="currentHeading === '{{desc.heading}}'"></{{desc.heading.toLowerCase()}}-demo>
|
||||
|
||||
<br>
|
||||
|
||||
@@ -30,17 +28,17 @@ tabDesc.forEach((desc:any) => {
|
||||
<tabset>
|
||||
<tab heading="Markup">
|
||||
<div class="card card-block panel panel-default panel-body">
|
||||
<pre class="language-html"><code class="language-html" ng-non-bindable>${desc.html}</code></pre>
|
||||
<pre class="language-html"><code class="language-html" ng-non-bindable>{{desc.html}}</code></pre>
|
||||
</div>
|
||||
</tab>
|
||||
<tab heading="TypeScript">
|
||||
<div class="card card-block panel panel-default panel-body">
|
||||
<pre class="language-typescript"><code class="language-typescript" ng-non-bindable>${desc.ts}</code></pre>
|
||||
<pre class="language-typescript"><code class="language-typescript" ng-non-bindable>{{desc.ts}}</code></pre>
|
||||
</div>
|
||||
</tab>
|
||||
<tab heading="Backend Demo">
|
||||
<div class="card card-block panel panel-default panel-body">
|
||||
<pre class="language-javascript"><code class="language-javascript" ng-non-bindable>${desc.js}</code></pre>
|
||||
<pre class="language-javascript"><code class="language-javascript" ng-non-bindable>{{desc.js}}</code></pre>
|
||||
</div>
|
||||
</tab>
|
||||
</tabset>
|
||||
@@ -53,22 +51,21 @@ tabDesc.forEach((desc:any) => {
|
||||
@Component({
|
||||
selector: 'file-upload-section',
|
||||
template: `
|
||||
<section id="${name.toLowerCase()}">
|
||||
<section [id]="name.toLowerCase()">
|
||||
<div class="row">
|
||||
<tabset>
|
||||
|
||||
${tabsContent}
|
||||
{{tabsContent}}
|
||||
|
||||
</tabset>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<h2>API</h2>
|
||||
<div class="card card-block panel panel-default panel-body">${doc}</div>
|
||||
<div class="card card-block panel panel-default panel-body">{{doc}}</div>
|
||||
</div>
|
||||
</section>
|
||||
`,
|
||||
directives: [SimpleDemoComponent, TAB_DIRECTIVES, CORE_DIRECTIVES]
|
||||
`
|
||||
})
|
||||
export class FileUploadSectionComponent {
|
||||
public currentHeading:string = 'Simple';
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import {Component} from '@angular/core';
|
||||
import {CORE_DIRECTIVES, FORM_DIRECTIVES, NgClass, NgStyle} from '@angular/common';
|
||||
import {FILE_UPLOAD_DIRECTIVES, FileUploader} from '../../../ng2-file-upload';
|
||||
import { Component } from '@angular/core';
|
||||
import { FileUploader } from '../../../ng2-file-upload';
|
||||
|
||||
// webpack html imports
|
||||
let template = require('./simple-demo.html');
|
||||
@@ -10,8 +9,7 @@ const URL = 'https://evening-anchorage-3159.herokuapp.com/api/';
|
||||
|
||||
@Component({
|
||||
selector: 'simple-demo',
|
||||
template: template,
|
||||
directives: [FILE_UPLOAD_DIRECTIVES, NgClass, NgStyle, CORE_DIRECTIVES, FORM_DIRECTIVES]
|
||||
template: template
|
||||
})
|
||||
export class SimpleDemoComponent {
|
||||
public uploader:FileUploader = new FileUploader({url: URL});
|
||||
|
||||
@@ -1,44 +1,4 @@
|
||||
import {bootstrap} from '@angular/platform-browser-dynamic';
|
||||
import {Component} from '@angular/core';
|
||||
import {NgClass} from '@angular/common';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
import { NgFileUploadDemo } from './ng2-file-upload-demo.module';
|
||||
|
||||
import {FileUploadSectionComponent} from './components/file-upload-section';
|
||||
|
||||
let gettingStarted = require('./getting-started.md');
|
||||
|
||||
@Component({
|
||||
selector: 'app',
|
||||
template: `
|
||||
<main class="bd-pageheader">
|
||||
<div class="container">
|
||||
<h1>ng2-file-upload</h1>
|
||||
<p>The Angular2 File Upload directives</p>
|
||||
<a class="btn btn-primary" href="https://github.com/valor-software/ng2-file-upload">View on GitHub</a>
|
||||
<div class="row">
|
||||
<div class="col-lg-1"><iframe src="https://ghbtns.com/github-btn.html?user=valor-software&repo=ng2-file-upload&type=star&count=true" frameborder="0" scrolling="0" width="170px" height="20px"></iframe></div>
|
||||
<div class="col-lg-1"><iframe src="https://ghbtns.com/github-btn.html?user=valor-software&repo=ng2-file-upload&type=fork&count=true" frameborder="0" scrolling="0" width="170px" height="20px"></iframe></div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<div class="container">
|
||||
<section id="getting-started">${gettingStarted}</section>
|
||||
|
||||
<file-upload-section class="col-md-12"></file-upload-section>
|
||||
</div>
|
||||
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
<p class="text-muted text-center"><a href="https://github.com/valor-software/ng2-file-upload">ng2-file-upload</a> is maintained by <a href="https://github.com/valor-software">valor-software</a>.</p>
|
||||
</div>
|
||||
</footer>
|
||||
`,
|
||||
directives: [
|
||||
NgClass,
|
||||
FileUploadSectionComponent
|
||||
]
|
||||
})
|
||||
export class DemoComponent {
|
||||
}
|
||||
|
||||
bootstrap(DemoComponent);
|
||||
platformBrowserDynamic().bootstrapModule(NgFileUploadDemo);
|
||||
|
||||
18
demo/ng2-file-upload-demo.module.ts
Normal file
18
demo/ng2-file-upload-demo.module.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
|
||||
import { Ng2BootstrapModule } from 'ng2-bootstrap/ng2-bootstrap'
|
||||
import { FileUploadModule } from '../components/file-upload/file-upload.module';
|
||||
import { DemoComponent } from './app.component.ts';
|
||||
import { FileUploadSectionComponent } from './components/file-upload-section';
|
||||
import { SimpleDemoComponent } from './components/file-upload/simple-demo';
|
||||
|
||||
@NgModule({
|
||||
imports: [BrowserModule, CommonModule, FileUploadModule, Ng2BootstrapModule, FormsModule],
|
||||
declarations: [DemoComponent, FileUploadSectionComponent, SimpleDemoComponent],
|
||||
bootstrap: [DemoComponent]
|
||||
})
|
||||
export class NgFileUploadDemo {
|
||||
}
|
||||
@@ -2,13 +2,4 @@ export * from './components/file-upload/file-select.directive';
|
||||
export * from './components/file-upload/file-drop.directive';
|
||||
export * from './components/file-upload/file-uploader.class';
|
||||
|
||||
import {FileSelectDirective} from './components/file-upload/file-select.directive';
|
||||
import {FileDropDirective} from './components/file-upload/file-drop.directive';
|
||||
|
||||
export const FILE_UPLOAD_DIRECTIVES:[any] = [FileSelectDirective, FileDropDirective];
|
||||
|
||||
export default {
|
||||
directives: [
|
||||
FILE_UPLOAD_DIRECTIVES
|
||||
]
|
||||
};
|
||||
export { FileUploadModule } from './components/file-upload/file-upload.module';
|
||||
|
||||
21
package.json
21
package.json
@@ -48,15 +48,16 @@
|
||||
"homepage": "https://github.com/valor-software/ng2-file-upload#readme",
|
||||
"dependencies": {},
|
||||
"peerDependencies": {
|
||||
"@angular/common": "^2.0.0-rc.1",
|
||||
"@angular/core": "^2.0.0-rc.1"
|
||||
"@angular/common": "2.0.0-rc.6",
|
||||
"@angular/core": "2.0.0-rc.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/common": "^2.0.0-rc.1",
|
||||
"@angular/compiler": "^2.0.0-rc.1",
|
||||
"@angular/core": "^2.0.0-rc.1",
|
||||
"@angular/platform-browser": "^2.0.0-rc.1",
|
||||
"@angular/platform-browser-dynamic": "^2.0.0-rc.1",
|
||||
"@angular/common": "2.0.0-rc.6",
|
||||
"@angular/compiler": "2.0.0-rc.6",
|
||||
"@angular/core": "2.0.0-rc.6",
|
||||
"@angular/platform-browser": "2.0.0-rc.6",
|
||||
"@angular/platform-browser-dynamic": "2.0.0-rc.6",
|
||||
"@angular/forms": "2.0.0-rc.6",
|
||||
"async": "1.5.2",
|
||||
"bootstrap": "3.3.6",
|
||||
"codecov": "1.0.1",
|
||||
@@ -92,7 +93,7 @@
|
||||
"lite-server": "2.2.0",
|
||||
"markdown-loader": "0.1.7",
|
||||
"marked": "0.3.5",
|
||||
"ng2-bootstrap": "1.0.17",
|
||||
"ng2-bootstrap": "1.1.1",
|
||||
"phantomjs-polyfill": "0.0.2",
|
||||
"phantomjs-prebuilt": "2.1.7",
|
||||
"pre-commit": "1.1.3",
|
||||
@@ -101,7 +102,7 @@
|
||||
"raw-loader": "0.5.1",
|
||||
"reflect-metadata": "0.1.2",
|
||||
"require-dir": "0.3.0",
|
||||
"rxjs": "5.0.0-beta.6",
|
||||
"rxjs": "5.0.0-beta.11",
|
||||
"source-map-loader": "0.1.5",
|
||||
"systemjs-builder": "0.15.19",
|
||||
"ts-loader": "0.8.2",
|
||||
@@ -110,7 +111,7 @@
|
||||
"typings": "0.8.1",
|
||||
"webpack": "1.13.1",
|
||||
"webpack-dev-server": "1.14.1",
|
||||
"zone.js": "0.6.12"
|
||||
"zone.js": "0.6.17"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user