Updating basic project (angular-universal starter) to the lattest version 17-10-2016
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@44092 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
926e88f516
commit
bfd3e43428
|
@ -1,9 +1,16 @@
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
|
||||||
|
<img src="https://cloud.githubusercontent.com/assets/1016365/10639063/138338bc-7806-11e5-8057-d34c75f3cafc.png" alt="Universal Angular 2" height="320"/>
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
# Angular 2 Universal Starter [![Universal Angular 2](https://img.shields.io/badge/universal-angular2-brightgreen.svg?style=flat)](https://github.com/angular/universal)
|
# Angular 2 Universal Starter [![Universal Angular 2](https://img.shields.io/badge/universal-angular2-brightgreen.svg?style=flat)](https://github.com/angular/universal)
|
||||||
> Server-Side Rendering for Angular 2
|
> Server-Side Rendering for Angular 2
|
||||||
|
|
||||||
A minimal Angular 2 starter for Universal JavaScript using TypeScript 2 and Webpack 2
|
A minimal Angular 2 starter for Universal JavaScript using TypeScript 2 and Webpack 2
|
||||||
|
|
||||||
> If you're looking for the Angular Universal repo go to [angular/universal](https://github.com/angular/universal)
|
> If you're looking for the Angular Universal repo go to [**angular/universal**](https://github.com/angular/universal)
|
||||||
|
|
||||||
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)
|
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)
|
||||||
|
|
||||||
|
@ -21,3 +28,27 @@ A minimal Angular 2 starter for Universal JavaScript using TypeScript 2 and Webp
|
||||||
|
|
||||||
## Watch files
|
## Watch files
|
||||||
* `npm run watch` to build your client app and start a web server
|
* `npm run watch` to build your client app and start a web server
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Documentation
|
||||||
|
[Design Doc](https://docs.google.com/document/d/1q6g9UlmEZDXgrkY88AJZ6MUrUxcnwhBGS0EXbVlYicY)
|
||||||
|
|
||||||
|
### Videos
|
||||||
|
Angular 2 Universal Patterns - ng-conf, May 2016
|
||||||
|
[![Angular 2 Universal Patterns](http://img.youtube.com/vi/TCj_oC3m6_U/0.jpg)](https://www.youtube.com/watch?v=TCj_oC3m6_U)
|
||||||
|
|
||||||
|
Angular Universal Source Code - ReadTheSource, January 2016
|
||||||
|
[![Angular Universal Source Code](http://img.youtube.com/vi/qOjtFjXoebY/0.jpg)](https://www.youtube.com/watch?v=qOjtFjXoebY)
|
||||||
|
|
||||||
|
Full Stack Angular 2 - AngularConnect, Oct 2015
|
||||||
|
[![Full Stack Angular 2](https://img.youtube.com/vi/MtoHFDfi8FM/0.jpg)](https://www.youtube.com/watch?v=MtoHFDfi8FM)
|
||||||
|
|
||||||
|
Angular 2 Server Rendering - Angular U, July 2015
|
||||||
|
[![Angular 2 Server Rendering](http://img.youtube.com/vi/0wvZ7gakqV4/0.jpg)](http://www.youtube.com/watch?v=0wvZ7gakqV4)
|
||||||
|
|
||||||
|
## [preboot.js](https://github.com/angular/preboot)
|
||||||
|
> Control server-rendered page and transfer state before client-side web app loads to the client-side-app.
|
||||||
|
|
||||||
|
# License
|
||||||
|
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](/LICENSE)
|
||||||
|
|
|
@ -29,30 +29,30 @@
|
||||||
"Mark Pieszak <mpieszak84@gmail.com>"
|
"Mark Pieszak <mpieszak84@gmail.com>"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/common": "2.0.0",
|
"@angular/common": "2.1.0",
|
||||||
"@angular/compiler": "2.0.0",
|
"@angular/compiler": "2.1.0",
|
||||||
"@angular/core": "2.0.0",
|
"@angular/core": "2.1.0",
|
||||||
"@angular/forms": "2.0.0",
|
"@angular/forms": "2.1.0",
|
||||||
"@angular/http": "2.0.0",
|
"@angular/http": "2.1.0",
|
||||||
"@angular/platform-browser": "2.0.0",
|
"@angular/platform-browser": "2.1.0",
|
||||||
"@angular/platform-browser-dynamic": "2.0.0",
|
"@angular/platform-browser-dynamic": "2.1.0",
|
||||||
"@angular/platform-server": "2.0.0",
|
"@angular/platform-server": "2.1.0",
|
||||||
"@angular/router": "3.0.0",
|
"@angular/router": "3.1.0",
|
||||||
"@ng-bootstrap/ng-bootstrap": "^1.0.0-alpha.6",
|
"@ng-bootstrap/ng-bootstrap": "^1.0.0-alpha.6",
|
||||||
"angular2-express-engine": "~2.0.11",
|
"angular2-express-engine": "~2.1.0-rc.1",
|
||||||
"angular2-platform-node": "~2.0.11",
|
"angular2-platform-node": "~2.1.0-rc.1",
|
||||||
"angular2-universal": "~2.0.11",
|
"angular2-universal": "~2.1.0-rc.1",
|
||||||
"angular2-universal-polyfills": "~2.0.11",
|
"angular2-universal-polyfills": "~2.1.0-rc.1",
|
||||||
"body-parser": "^1.15.2",
|
"body-parser": "^1.15.2",
|
||||||
"bootstrap": "^4.0.0-alpha.4",
|
"bootstrap": "^4.0.0-alpha.4",
|
||||||
"express": "^4.14.0",
|
"express": "^4.14.0",
|
||||||
"methods": "~1.1.2",
|
"methods": "~1.1.2",
|
||||||
"ng2-webstorage": "^1.2.2",
|
"ng2-webstorage": "^1.2.2",
|
||||||
|
"preboot": "~4.5.2",
|
||||||
"rxjs": "5.0.0-beta.12",
|
"rxjs": "5.0.0-beta.12",
|
||||||
"zone.js": "0.6.23"
|
"zone.js": "~0.6.25"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angularclass/resolve-angular-routes": "^1.0.9",
|
|
||||||
"@types/body-parser": "0.0.29",
|
"@types/body-parser": "0.0.29",
|
||||||
"@types/compression": "0.0.29",
|
"@types/compression": "0.0.29",
|
||||||
"@types/cookie-parser": "^1.3.29",
|
"@types/cookie-parser": "^1.3.29",
|
||||||
|
@ -72,10 +72,10 @@
|
||||||
"string-replace-loader": "github:gdi2290/string-replace-loader",
|
"string-replace-loader": "github:gdi2290/string-replace-loader",
|
||||||
"ts-loader": "^0.8.2",
|
"ts-loader": "^0.8.2",
|
||||||
"ts-node": "^1.3.0",
|
"ts-node": "^1.3.0",
|
||||||
"typescript": "2.0.0",
|
"typescript": "2.0.2",
|
||||||
"webpack": "2.1.0-beta.22",
|
"webpack": "2.1.0-beta.25",
|
||||||
"webpack-dev-middleware": "^1.6.1",
|
"webpack-dev-middleware": "^1.6.1",
|
||||||
"webpack-dev-server": "^2.1.0-beta.0",
|
"webpack-dev-server": "2.1.0-beta.9",
|
||||||
"webpack-merge": "^0.13.0"
|
"webpack-merge": "^0.13.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -210,7 +210,7 @@ private afterclaimsInsertion(insertedIds, errorInClaims){
|
||||||
if(this.inline){
|
if(this.inline){
|
||||||
this.show = "end";
|
this.show = "end";
|
||||||
}else{
|
}else{
|
||||||
this._router.navigate( ['/my-claims'] );
|
this._router.navigate( ['/myclaims'] );
|
||||||
}
|
}
|
||||||
this.showChange.emit({
|
this.showChange.emit({
|
||||||
value: this.show
|
value: this.show
|
||||||
|
|
|
@ -4,7 +4,7 @@ import {DataProviderService} from '../../services/dataProvider.service';
|
||||||
import {DataProviderInfo} from '../../utils/entities/dataProviderInfo';
|
import {DataProviderInfo} from '../../utils/entities/dataProviderInfo';
|
||||||
import {ActivatedRoute} from '@angular/router';
|
import {ActivatedRoute} from '@angular/router';
|
||||||
|
|
||||||
import{TabsComponent} from './tabs.component.ts';
|
import{TabsComponent} from './tabs.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'dataprovider',
|
selector: 'dataprovider',
|
||||||
|
|
|
@ -9,12 +9,12 @@ import {ServicesModule} from '../services/services.module';
|
||||||
|
|
||||||
import {SearchModule} from '../searchPages/search.module';
|
import {SearchModule} from '../searchPages/search.module';
|
||||||
|
|
||||||
import {TabPagingComponent} from './tabPaging.component.ts';
|
import {TabPagingComponent} from './tabPaging.component';
|
||||||
import {TabTableComponent} from './tabTable.component.ts';
|
import {TabTableComponent} from './tabTable.component';
|
||||||
import {ShowTitleComponent} from './showTitle.component.ts';
|
import {ShowTitleComponent} from './showTitle.component';
|
||||||
import {ShowAuthorsComponent} from './showAuthors.component.ts';
|
import {ShowAuthorsComponent} from './showAuthors.component';
|
||||||
import {ShowIdentifiersComponent} from './showIdentifiers.component.ts';
|
import {ShowIdentifiersComponent} from './showIdentifiers.component';
|
||||||
import {ShowSubjectsComponent} from './showSubjects.component.ts';
|
import {ShowSubjectsComponent} from './showSubjects.component';
|
||||||
|
|
||||||
import {PublicationsTabComponent} from './dataProvider/publicationsTab.component';
|
import {PublicationsTabComponent} from './dataProvider/publicationsTab.component';
|
||||||
import {DatasetsTabComponent} from './dataProvider/datasetsTab.component';
|
import {DatasetsTabComponent} from './dataProvider/datasetsTab.component';
|
||||||
|
|
|
@ -11,7 +11,7 @@ import {PagingFormatter} from './pagingFormatter.component';
|
||||||
import {AutocompleteComponent} from './autoComplete.component';
|
import {AutocompleteComponent} from './autoComplete.component';
|
||||||
|
|
||||||
import {ShowDataProvidersComponent} from './showDataProviders.component';
|
import {ShowDataProvidersComponent} from './showDataProviders.component';
|
||||||
import {ExportCSVComponent} from './exportCSV.component.ts';
|
import {ExportCSVComponent} from './exportCSV.component';
|
||||||
import {IFrameComponent} from './iframe.component';
|
import {IFrameComponent} from './iframe.component';
|
||||||
|
|
||||||
import {AlertModal} from './modal/alert';
|
import {AlertModal} from './modal/alert';
|
||||||
|
|
|
@ -8,7 +8,7 @@ import { platformUniversalDynamic } from 'angular2-universal';
|
||||||
// enable prod for faster renders
|
// enable prod for faster renders
|
||||||
enableProdMode();
|
enableProdMode();
|
||||||
|
|
||||||
import { MainModule } from './main.browser';
|
import { MainModule } from './app.browser.module';
|
||||||
|
|
||||||
const platformRef = platformUniversalDynamic();
|
const platformRef = platformUniversalDynamic();
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ import { enableProdMode } from '@angular/core';
|
||||||
import { createEngine } from 'angular2-express-engine';
|
import { createEngine } from 'angular2-express-engine';
|
||||||
|
|
||||||
// App
|
// App
|
||||||
import { MainModule } from './main.node';
|
import { MainModule } from './app.node.module';
|
||||||
|
|
||||||
// enable prod for faster renders
|
// enable prod for faster renders
|
||||||
enableProdMode();
|
enableProdMode();
|
||||||
|
@ -47,7 +47,7 @@ function ngApp(req, res) {
|
||||||
preboot: false,
|
preboot: false,
|
||||||
baseUrl: '/',
|
baseUrl: '/',
|
||||||
requestUrl: req.originalUrl,
|
requestUrl: req.originalUrl,
|
||||||
originUrl: req.hostname
|
originUrl: 'http://localhost:3000'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// Routes with html5pushstate
|
// Routes with html5pushstate
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
var webpack = require('webpack');
|
var webpack = require('webpack');
|
||||||
var path = require('path');
|
var path = require('path');
|
||||||
var resolveNgRoute = require('@angularclass/resolve-angular-routes');
|
|
||||||
|
|
||||||
|
|
||||||
var commonConfig = {
|
var commonConfig = {
|
||||||
resolve: {
|
resolve: {
|
||||||
extensions: ['', '.ts', '.js', '.json']
|
extensions: ['.ts', '.js', '.json']
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
loaders: [
|
loaders: [
|
||||||
|
@ -21,7 +20,7 @@ var commonConfig = {
|
||||||
// The (\\|\/) piece accounts for path separators in *nix and Windows
|
// The (\\|\/) piece accounts for path separators in *nix and Windows
|
||||||
/angular(\\|\/)core(\\|\/)src(\\|\/)linker/,
|
/angular(\\|\/)core(\\|\/)src(\\|\/)linker/,
|
||||||
root('./src'),
|
root('./src'),
|
||||||
resolveNgRoute(root('./src'))
|
{}
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -52,7 +51,7 @@ var serverConfig = {
|
||||||
libraryTarget: 'commonjs2'
|
libraryTarget: 'commonjs2'
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
preLoaders: [
|
loaders: [
|
||||||
{ test: /angular2-material/, loader: "imports-loader?window=>global" }
|
{ test: /angular2-material/, loader: "imports-loader?window=>global" }
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -92,9 +91,6 @@ var serverConfig = {
|
||||||
// Default config
|
// Default config
|
||||||
var defaultConfig = {
|
var defaultConfig = {
|
||||||
context: __dirname,
|
context: __dirname,
|
||||||
resolve: {
|
|
||||||
root: root('/src')
|
|
||||||
},
|
|
||||||
output: {
|
output: {
|
||||||
publicPath: path.resolve(__dirname),
|
publicPath: path.resolve(__dirname),
|
||||||
filename: 'index.js'
|
filename: 'index.js'
|
||||||
|
|
Loading…
Reference in New Issue