Updating Naming and Files to Work With Services
This commit is contained in:
@@ -3,41 +3,49 @@ import { Component } from '@angular/core';
|
||||
let gettingStarted = require('html-loader!markdown-loader!../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>
|
||||
selector: 'app',
|
||||
template: `
|
||||
<main class="bd-pageheader">
|
||||
<div class="container">
|
||||
<h1>ng2-chunk-file-upload</h1>
|
||||
<p>The Angular2 File Upload directives</p>
|
||||
<a class="btn btn-primary" href="https://github.com/valor-software/ng2-chunk-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-chunk-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-chunk-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" [innerHtml]="gettingStarted"></section>
|
||||
<div class="container">
|
||||
<section id="getting-started" [innerHtml]="gettingStarted"></section>
|
||||
|
||||
<file-upload-section class="col-md-12"></file-upload-section>
|
||||
</div>
|
||||
<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>
|
||||
`
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
<p class="text-muted text-center">
|
||||
<a href="https://github.com/valor-software/ng2-chunk-file-upload">ng2-chunk-file-upload</a>
|
||||
is maintained by <a href="https://github.com/valor-software">valor-software</a>.</p>
|
||||
</div>
|
||||
</footer>
|
||||
`
|
||||
})
|
||||
export class AppComponent {
|
||||
public gettingStarted:string = gettingStarted;
|
||||
public ngAfterContentInit(): any {
|
||||
setTimeout(()=>{
|
||||
if (typeof PR !== 'undefined') {
|
||||
// google code-prettify
|
||||
PR.prettyPrint();
|
||||
}
|
||||
}, 150);
|
||||
}
|
||||
public gettingStarted: string = gettingStarted;
|
||||
public ngAfterContentInit(): any {
|
||||
setTimeout(() => {
|
||||
if (typeof PR !== 'undefined') {
|
||||
// google code-prettify
|
||||
PR.prettyPrint();
|
||||
}
|
||||
}, 150);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,16 +4,21 @@ import { FormsModule } from '@angular/forms';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
|
||||
import { TabsModule } from 'ngx-bootstrap/tabs';
|
||||
import { FileUploadModule } from 'ng2-file-upload';
|
||||
import { FileUploadModule } from 'ng2-chunk-file-upload';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { FileUploadSectionComponent } from './components/file-upload-section';
|
||||
import { SimpleDemoComponent } from './components/file-upload/simple-demo';
|
||||
|
||||
@NgModule({
|
||||
imports: [BrowserModule, CommonModule, FileUploadModule, TabsModule.forRoot(), FormsModule],
|
||||
declarations: [AppComponent, FileUploadSectionComponent, SimpleDemoComponent],
|
||||
bootstrap: [AppComponent]
|
||||
imports: [
|
||||
BrowserModule,
|
||||
CommonModule,
|
||||
FileUploadModule,
|
||||
TabsModule.forRoot(),
|
||||
FormsModule,
|
||||
],
|
||||
declarations: [AppComponent, FileUploadSectionComponent, SimpleDemoComponent],
|
||||
bootstrap: [AppComponent],
|
||||
})
|
||||
export class AppModule {
|
||||
}
|
||||
export class AppModule {}
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { Component } from "@angular/core";
|
||||
|
||||
let doc = require('html-loader!markdown-loader!../../doc.md');
|
||||
let doc = require("html-loader!markdown-loader!../../doc.md");
|
||||
|
||||
let tabDesc:Array<any> = [
|
||||
let tabDesc: Array<any> = [
|
||||
{
|
||||
heading: 'Simple',
|
||||
ts: require('!!raw-loader?lang=typescript!./file-upload/simple-demo.ts'),
|
||||
html: require('!!raw-loader?lang=markup!./file-upload/simple-demo.html'),
|
||||
js: require('!!raw-loader?lang=javascript!./file-upload/file-catcher.js')
|
||||
}
|
||||
ts: require("!!raw-loader?lang=typescript!./file-upload/simple-demo.ts"),
|
||||
html: require("!!raw-loader?lang=markup!./file-upload/simple-demo.html"),
|
||||
js: require("!!raw-loader?lang=javascript!./file-upload/file-catcher.js")
|
||||
},
|
||||
];
|
||||
|
||||
@Component({
|
||||
selector: 'file-upload-section',
|
||||
templateUrl: './file-upload-section.html'
|
||||
selector: "file-upload-section",
|
||||
templateUrl: "./file-upload-section.html",
|
||||
})
|
||||
export class FileUploadSectionComponent {
|
||||
public name:string = 'File Upload';
|
||||
public currentHeading:string = 'Simple';
|
||||
public doc:string = doc;
|
||||
public tabs:any = tabDesc;
|
||||
public name: string = 'File Upload';
|
||||
public currentHeading: string = 'Simple';
|
||||
public doc: string = doc;
|
||||
public tabs: any = tabDesc;
|
||||
|
||||
public select(e:any):void {
|
||||
public select(e: any): void {
|
||||
if (e.heading) {
|
||||
this.currentHeading = e.heading;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { FileUploader } from 'ng2-file-upload';
|
||||
import { FileUploader } from 'ng2-chunk-file-upload';
|
||||
|
||||
// const URL = '/api/';
|
||||
const URL = 'https://evening-anchorage-3159.herokuapp.com/api/';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
### Usage
|
||||
```typescript
|
||||
import { FileSelectDirective, FileDropDirective, FileUploader } from 'ng2-file-upload/ng2-file-upload';
|
||||
import { FileSelectDirective, FileDropDirective, FileUploader } from 'ng2-chunk-file-upload/ng2-chunk-file-upload';
|
||||
```
|
||||
|
||||
### Annotations
|
||||
@@ -18,7 +18,7 @@ import { FileSelectDirective, FileDropDirective, FileUploader } from 'ng2-file-u
|
||||
|
||||
### Properties
|
||||
|
||||
- `uploader` - (`FileUploader`) - uploader object. See using in [demo](https://github.com/valor-software/ng2-file-upload/blob/master/demo/components/file-upload/simple-demo.ts)
|
||||
- `uploader` - (`FileUploader`) - uploader object. See using in [demo](https://github.com/valor-software/ng2-chunk-file-upload/blob/master/demo/components/file-upload/simple-demo.ts)
|
||||
|
||||
Parameters supported by this object:
|
||||
|
||||
@@ -37,11 +37,11 @@ import { FileSelectDirective, FileDropDirective, FileUploader } from 'ng2-file-u
|
||||
|
||||
### Properties
|
||||
|
||||
- `uploader` - (`FileUploader`) - uploader object. See using in [demo](https://github.com/valor-software/ng2-file-upload/blob/master/demo/components/file-upload/simple-demo.ts)
|
||||
- `uploader` - (`FileUploader`) - uploader object. See using in [demo](https://github.com/valor-software/ng2-chunk-file-upload/blob/master/demo/components/file-upload/simple-demo.ts)
|
||||
|
||||
### Events
|
||||
|
||||
- `fileOver` - it fires during 'over' and 'out' events for Drop Area; returns `boolean`: `true` if file is over Drop Area, `false` in case of out.
|
||||
See using in [ts demo](https://github.com/valor-software/ng2-file-upload/blob/master/demo/components/file-upload/simple-demo.ts) and
|
||||
[html demo](https://github.com/valor-software/ng2-file-upload/blob/master/demo/components/file-upload/simple-demo.html)
|
||||
See using in [ts demo](https://github.com/valor-software/ng2-chunk-file-upload/blob/master/demo/components/file-upload/simple-demo.ts) and
|
||||
[html demo](https://github.com/valor-software/ng2-chunk-file-upload/blob/master/demo/components/file-upload/simple-demo.html)
|
||||
- `onFileDrop` - it fires after a file has been dropped on a Drop Area; you can pass in `$event` to get the list of files that were dropped. i.e. `(onFileDrop)="dropped($event)"`
|
||||
|
||||
@@ -6,5 +6,5 @@
|
||||
|
||||
Install the components
|
||||
```
|
||||
npm install ng2-file-upload --save
|
||||
npm install ng2-chunk-file-upload --save
|
||||
```
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<link rel="icon" href="data:;base64,iVBORw0KGgo=">
|
||||
<link rel="author" href="https://github.com/valor-software/ng2-file-upload/graphs/contributors">
|
||||
<link rel="author" href="https://github.com/valor-software/ng2-chunk-file-upload/graphs/contributors">
|
||||
|
||||
<!--link to bootstrap.css-->
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
|
||||
|
||||
Reference in New Issue
Block a user