This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo apt-get install gcc-avr avr-libc | |
| sudo adduser [user] vboxusers | |
| sudo usermod -a -G tty [user] | |
| sudo usermod -a -G dialout [user] | |
| logout/login | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| table[name="pepe"]>thead>tr>th*3^^+tbody>tr*7>td{Basico}*3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ng new angular-universal-example — style=scss | |
| cd angular-universal-example |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # install material dependency | |
| npm i -S @angular/material @angular/cdk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // app.server.module.ts | |
| import { NgModule } from '@angular/core'; | |
| import { ServerModule } from '@angular/platform-server'; | |
| import { AppModule } from './app.module'; | |
| import { AppComponent } from './app.component'; | |
| @NgModule({ | |
| imports: [ | |
| AppModule, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // main.server.ts | |
| export { AppServerModule } from './app/app.server.module'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "extends": "../tsconfig.json", | |
| "compilerOptions": { | |
| "outDir": "../out-tsc/app", | |
| "baseUrl": "./", | |
| "module": "commonjs", | |
| "types": [] | |
| }, | |
| "exclude": [ | |
| "test.ts", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // server.ts | |
| import 'reflect-metadata'; | |
| import 'zone.js/dist/zone-node'; | |
| import { renderModuleFactory } from '@angular/platform-server'; | |
| import { enableProdMode } from '@angular/core'; | |
| import * as express from 'express'; | |
| import { join } from 'path'; | |
| import { readFileSync } from 'fs'; | |
| enableProdMode(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // webpack.config.ts | |
| const path = require('path'); | |
| var nodeExternals = require('webpack-node-externals'); | |
| module.exports = { | |
| entry: { | |
| server: './src/server.ts' | |
| }, | |
| resolve: { | |
| extensions: ['.ts', '.js'], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "angular-universal-example", | |
| ... | |
| "scripts": { | |
| "ng": "ng", | |
| "start": "ng serve", | |
| "start:ssr": "node dist/server.js", | |
| "build": "run-s build:client build:aot build:server", | |
| "build:client": "ng build -prod --build-optimizer --app 0", | |
| "build:aot": "ng build --aot --app 1", |
OlderNewer