add ng2-webpack-config
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import {Component} from '@angular/core';
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
let gettingStarted = require('./getting-started.md');
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {Component} from '@angular/core';
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
let doc = require('../../components/file-upload/readme.md');
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {Component, ElementRef, Renderer, Input, HostListener, HostBinding, OnInit} from '@angular/core';
|
||||
import {FileUploader, FileUploaderOptions} from '../../../../ng2-file-upload';
|
||||
import { Component, ElementRef, Renderer, Input, HostListener, HostBinding, OnInit } from '@angular/core';
|
||||
import { FileUploader, FileUploaderOptions } from '../../../../ng2-file-upload';
|
||||
|
||||
@Component({
|
||||
selector: 'demo-file-upload',
|
||||
|
||||
1
demo/custom-typings.d.ts
vendored
Normal file
1
demo/custom-typings.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
declare const ENV:string;
|
||||
@@ -10,9 +10,9 @@ 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]
|
||||
imports: [BrowserModule, CommonModule, FileUploadModule, Ng2BootstrapModule, FormsModule],
|
||||
declarations: [DemoComponent, FileUploadSectionComponent, SimpleDemoComponent],
|
||||
bootstrap: [DemoComponent]
|
||||
})
|
||||
export class NgFileUploadDemo {
|
||||
}
|
||||
|
||||
28
demo/polyfills.ts
Normal file
28
demo/polyfills.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
// Polyfills
|
||||
// (these modules are what are in 'angular2/bundles/angular2-polyfills' so don't use that here)
|
||||
|
||||
// import 'ie-shim'; // Internet Explorer
|
||||
// import 'es6-shim';
|
||||
// import 'es6-promise';
|
||||
// import 'es7-reflect-metadata';
|
||||
|
||||
// Prefer CoreJS over the polyfills above
|
||||
import 'core-js/es6';
|
||||
import 'core-js/es7/reflect';
|
||||
require('zone.js/dist/zone');
|
||||
require('reflect-metadata');
|
||||
|
||||
// Typescript emit helpers polyfill
|
||||
import 'ts-helpers';
|
||||
|
||||
if ('production' === ENV) {
|
||||
// Production
|
||||
|
||||
} else {
|
||||
// Development
|
||||
|
||||
(Error as any).stackTraceLimit = Infinity;
|
||||
|
||||
require('zone.js/dist/long-stack-trace-zone');
|
||||
|
||||
}
|
||||
23
demo/vendor.ts
Normal file
23
demo/vendor.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
// For vendors for example jQuery, Lodash, angular2-jwt just import them here unless you plan on
|
||||
// chunking vendors files for async loading. You would need to import the async loaded vendors
|
||||
// at the entry point of the async loaded file. Also see custom-typings.d.ts as you also need to
|
||||
// run `typings install x` where `x` is your module
|
||||
|
||||
// Angular 2
|
||||
import '@angular/common';
|
||||
import '@angular/core';
|
||||
import '@angular/forms';
|
||||
import '@angular/platform-browser';
|
||||
import '@angular/platform-browser-dynamic';
|
||||
|
||||
// RxJS
|
||||
import 'rxjs/add/operator/map';
|
||||
import 'rxjs/add/operator/mergeMap';
|
||||
|
||||
if ('production' === ENV) {
|
||||
// Production
|
||||
|
||||
} else {
|
||||
// Development
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user