Tested with angular@5.
npm i @angular/platform-server @nguniversal/express-engine @nguniversal/module-map-ngfactory-loader express @types/express ts-loader@3 rimraf --save-dev
| // USAGE: | |
| // | |
| // When you attach the infiniteScroll directive to an element, it will emit the infiniteScrollAction | |
| // @Output() event every time the user has scrolled to the bottom of the element. Your loadMoreArticles | |
| // function can make an HTTP call and append the results to the articles list, for example. In doing this, | |
| // you effectively increase the height of the element and thus begin the process of the infiniteScroll directive | |
| // again, over and over until the element height stops increasing. | |
| // | |
| // <div class="container" infiniteScroll (infiniteScrollAction)="loadMoreArticles()"> | |
| // <div class="article" *ngFor="let article of articles"> |
| { | |
| "orderId": "20200716090931250a5098", | |
| "orderStatus": null, | |
| "type": 1, | |
| "status": 0, | |
| "bookingId": "31", | |
| "pricingId": "202007160909425356-4ce38307-d7c7-404f-960f-236a33575483", | |
| "pricingExpiryDate": "2020/07/17 15:59", | |
| "flights": [ | |
| { |
| var IMAGE_MIME_REGEX = /^image\/(p?jpeg|gif|png)$/i; | |
| var loadImage = function (file) { | |
| var reader = new FileReader(); | |
| reader.onload = function(e){ | |
| var img = document.createElement('img'); | |
| img.src = e.target.result; | |
| var range = window.getSelection().getRangeAt(0); | |
| range.deleteContents(); |
| import * as Rx from "rxjs/Rx"; | |
| import * as uuid from "uuid"; | |
| import {IRequest} from "./common"; | |
| let button = document.querySelector("button"); | |
| let iframe = document.createElement("iframe"); | |
| iframe.src = "/proxy.html"; | |
| document.body.appendChild(iframe); |
| # VsCode Settings | |
| ```json | |
| { | |
| "workbench.iconTheme": "material-icon-theme", | |
| // 終端機設定 | |
| "terminal.external.windowsExec": "C:\\Program Files\\Git\\bin\\bash.exe", | |
| "terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe", | |
| "terminal.integrated.shellArgs.windows": ["-l"], | |
| // 縮放比例 |
| /* image rotate javascript */ | |
| /* This script and many more are available free online at | |
| The JavaScript Source!! http://javascript.internet.com | |
| Created by: Benoit Asselin | http://www.ab-d.fr */ | |
| function rotate(p_deg) { | |
| if(document.getElementById('canvas')) { | |
| /* | |
| Ok!: Firefox 2, Safari 3, Opera 9.5b2 |
| { | |
| "workbench.iconTheme": "material-icon-theme", | |
| // 終端機設定 | |
| "terminal.external.windowsExec": "D:\\Git\\bin\\bash.exe", | |
| "terminal.integrated.shell.windows": "D:\\Git\\bin\\bash.exe", | |
| "terminal.integrated.shellArgs.windows": ["-l"], | |
| // 縮放比例 | |
| "window.zoomLevel": 0, | |
| "editor.mouseWheelZoom": true, | |
| // 字型 |