Skip to content

Commit f8555b4

Browse files
committed
Merge branch 'master' into material2
# Conflicts: # src/app/transfer-back/transfer-back.component.ts
2 parents 6757950 + c97acd2 commit f8555b4

File tree

5 files changed

+291
-39
lines changed

5 files changed

+291
-39
lines changed

server.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ const path = require('path');
44
const template = fs.readFileSync(path.join(__dirname, '.', 'dist', 'index.html')).toString();
55
const win = domino.createWindow(template);
66
const files = fs.readdirSync(`${process.cwd()}/dist-server`);
7-
const styleFiles = files.filter(file => file.startsWith('styles'));
8-
const hashStyle = styleFiles[0].split('.')[1];
9-
const style = fs.readFileSync(path.join(__dirname, '.', 'dist-server', `styles.${hashStyle}.bundle.css`)).toString();
7+
// const styleFiles = files.filter(file => file.startsWith('styles'));
8+
// const hashStyle = styleFiles[0].split('.')[1];
9+
// const style = fs.readFileSync(path.join(__dirname, '.', 'dist-server', `styles.${hashStyle}.bundle.css`)).toString();
1010

1111
global['window'] = win;
1212
Object.defineProperty(win.document.body.style, 'transform', {
@@ -18,7 +18,7 @@ Object.defineProperty(win.document.body.style, 'transform', {
1818
},
1919
});
2020
global['document'] = win.document;
21-
global['CSS'] = style;
21+
global['CSS'] = null;
2222
// global['XMLHttpRequest'] = require('xmlhttprequest').XMLHttpRequest;
2323
global['Prism'] = null;
2424

src/app/app.module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ import { RouterModule } from '@angular/router';
33
import { CommonModule } from '@angular/common';
44
import { TransferHttpModule } from './../modules/transfer-http/transfer-http.module';
55
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
6-
import { HttpModule } from '@angular/http';
76
import { BrowserModule } from '@angular/platform-browser';
87
import { NgModule } from '@angular/core';
98
import { AppComponent } from './app.component';
109
import { CookieService } from 'ngx-cookie-service';
10+
import { HttpClientModule } from '@angular/common/http';
1111

1212
@NgModule({
1313
declarations: [
1414
AppComponent,
1515
],
1616
imports: [
1717
BrowserModule.withServerTransition({ appId: 'my-app' }),
18-
HttpModule,
18+
HttpClientModule,
1919
RouterModule,
2020
AppRoutes,
2121
TransferHttpModule,

src/app/app.server.module.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { AppStorage } from './../forStorage/universal.inject';
33
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
44
import { NgModule, ApplicationRef, APP_BOOTSTRAP_LISTENER } from '@angular/core';
55
import { ServerModule } from '@angular/platform-server';
6-
import { HttpModule } from '@angular/http';
76
import { AppComponent } from './app.component';
87
import { AppModule } from './app.module';
98
import { BrowserModule } from '@angular/platform-browser';

src/modules/transfer-http/transfer-http.module.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { NgModule } from '@angular/core';
2-
import { Http, HttpModule } from '@angular/http';
32
import { TransferHttp } from './transfer-http';
43

54
@NgModule({

0 commit comments

Comments
 (0)