fixing node_modules/@types/cookie-parser errors | correcting previous wrong commit for file app.module.ts

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@48850 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2017-08-29 12:16:21 +00:00
parent 55db83bae2
commit caa07034a4
7 changed files with 26 additions and 58 deletions

View File

@ -102,11 +102,8 @@ app.use(interceptor((req, res)=>({
}
} else {
const { output, encoding } = mcache.get(key);
if(encodings.has(encoding)){
res.setHeader('Content-Encoding', encoding);
send(output);
return;
}
res.setHeader('Content-Encoding', encoding);
send(output);
}
send(output);
}

View File

@ -77,7 +77,7 @@
"@types/morgan": "^1.7.32",
"@types/body-parser": "0.0.29",
"@types/compression": "0.0.29",
"@types/cookie-parser": "^1.3.29",
"@types/cookie-parser": "1.3.30",
"@types/express": "^4.0.32",
"@types/express-serve-static-core": "^4.0.33",
"@types/hammerjs": "^2.0.32",

View File

@ -5,7 +5,7 @@ import { Component, Directive, ElementRef, Renderer, ChangeDetectionStrategy, Vi
// ** Example Directive
// Notice we don't touch the Element directly
@Directive({
/*@Directive({
selector: '[xLarge]'
})
export class XLargeDirective {
@ -17,7 +17,7 @@ export class XLargeDirective {
// ^^
}
}
*/
@Component({
changeDetection: ChangeDetectionStrategy.Default,
encapsulation: ViewEncapsulation.Emulated,

View File

@ -1,4 +1,8 @@
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { SharedModule } from './shared/shared.module';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
@ -9,7 +13,7 @@ import { CookieLawModule } from './sharedComponents/cookie-law/cookie-law.module
import { XSRFStrategy, CookieXSRFStrategy, RequestOptions } from '@angular/http';
@NgModule({
declarations: [ AppComponent, XLargeDirective ],
declarations: [ AppComponent ],
imports: [
SharedModule,

View File

@ -76,30 +76,16 @@ import { serverApi, createTodoApi } from './backend/api';
app.get('/data.json', serverApi);
app.use('/api', createTodoApi());
process.on('uncaughtException', function (err) {
console.error('Catching uncaught errors to avoid process crash', err);
});
function ngApp(req, res) {
function onHandleError(parentZoneDelegate, currentZone, targetZone, error) {
console.warn('Error in SSR, serving for direct CSR');
res.sendFile('index.html', {root: './src'});
return false;
}
Zone.current.fork({ name: 'CSR fallback', onHandleError }).run(() => {
res.render('index', {
req,
res,
// time: true, // use this to determine what part of your app is slow only in development
preboot: false,
baseUrl: '/',
requestUrl: req.originalUrl,
originUrl: `http://localhost:${ app.get('port') }`
});
res.render('index', {
req,
res,
// time: true, // use this to determine what part of your app is slow only in development
preboot: false,
baseUrl: '/',
requestUrl: req.originalUrl,
originUrl: `http://localhost:${ app.get('port') }`
});
}
/**

View File

@ -69,30 +69,16 @@ import { serverApi, createTodoApi } from './backend/api';
app.get('/data.json', serverApi);
app.use('/api', createTodoApi());
process.on('uncaughtException', function (err) {
console.error('Catching uncaught errors to avoid process crash', err);
});
function ngApp(req, res) {
function onHandleError(parentZoneDelegate, currentZone, targetZone, error) {
console.warn('Error in SSR, serving for direct CSR');
res.sendFile('index.html', {root: './src'});
return false;
}
Zone.current.fork({ name: 'CSR fallback', onHandleError }).run(() => {
res.render('index', {
req,
res,
// time: true, // use this to determine what part of your app is slow only in development
preboot: false,
baseUrl: '/',
requestUrl: req.originalUrl,
originUrl: `http://localhost:${ app.get('port') }`
});
res.render('index', {
req,
res,
// time: true, // use this to determine what part of your app is slow only in development
preboot: false,
baseUrl: '/',
requestUrl: req.originalUrl,
originUrl: `http://localhost:${ app.get('port') }`
});
}
/**

View File

@ -31,10 +31,6 @@ declare module 'modern-lru' {
export = x;
}
//declare var clipboard: any;
//import * as Clipboard from 'clipboard';
declare var System: SystemJS;
interface SystemJS {
@ -44,7 +40,6 @@ interface SystemJS {
declare var ENV: string;
declare var HMR: boolean;
declare var Zone: {current: any};
interface GlobalEnvironment {
ENV;
HMR;