Updating to RC6
This commit is contained in:
@@ -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});
|
||||
|
||||
Reference in New Issue
Block a user