Skip to content

Commit 41460e1

Browse files
committed
Merge branch 'master' into material2
2 parents f8555b4 + b494889 commit 41460e1

File tree

2 files changed

+33
-11
lines changed

2 files changed

+33
-11
lines changed

README.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,15 @@
99

1010
- http://master-csr.gorniv.com/ - клиенский рендеринг master
1111

12-
- http://ionic-ssr.gorniv.com/ - серверный рендеринг ionic
13-
14-
- http://ionic-csr.gorniv.com/ - клиенский рендеринг ionic
15-
16-
- http://material2-ssr.gorniv.com/ - серверный рендеринг material2
17-
18-
- http://material2-csr.gorniv.com/ - клиенский рендеринг material2
19-
20-
- http://primeng-ssr.gorniv.com/ - серверный рендеринг primeng
21-
22-
- http://primeng-csr.gorniv.com/ - клиенский рендеринг primeng
12+
# Планы:
13+
- [x] Angular 5
14+
- [x] `document is not defined` и `window is not defined` - [тут](./defined.md)
15+
- [x] [Angular Material2](https://material.angular.io/) **UI компоненты** - [отдельная ветка](https://github.com/Angular-RU/angular-universal-starter/tree/material2)
16+
- [x] [Primeng](https://www.primefaces.org/primeng/) **UI компоненты** - [отдельная ветка](https://github.com/Angular-RU/angular-universal-starter/tree/primeng)
17+
- [x] импорт модулей в зависимости от платформы (`MockServerBrowserModule`)
18+
- [x] выполнение запросов к api на сервере `TransferHttp`
19+
- [x] работа с Cookies на сервере `UniversalStorage`
20+
- [ ] Ionic - необходимо собрать веб версию, пока есть проблемы [отдельная ветка](https://github.com/Angular-RU/angular-universal-starter/tree/ionic)
2321

2422
## Как запустить
2523
- `yarn` или `npm install`

defined.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Решение проблемы глобальных переменных.
2+
server.ts:
3+
4+
```ts
5+
const domino = require('domino');
6+
const fs = require('fs');
7+
const path = require('path');
8+
const template = fs.readFileSync(path.join(__dirname, '.', 'dist', 'index.html')).toString();
9+
const win = domino.createWindow(template);
10+
const files = fs.readdirSync(`${process.cwd()}/dist-server`);
11+
12+
global['window'] = win;
13+
Object.defineProperty(win.document.body.style, 'transform', {
14+
value: () => {
15+
return {
16+
enumerable: true,
17+
configurable: true
18+
};
19+
},
20+
});
21+
22+
global['document'] = win.document;
23+
global['CSS'] = null;
24+
```

0 commit comments

Comments
 (0)