From: Bill Erickson Date: Tue, 12 Dec 2017 16:27:23 +0000 (-0500) Subject: ang2 notes X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=958ab4b5d1d7817f18a378f7cf6fcebe18430b80;p=working%2Frandom.git ang2 notes Signed-off-by: Bill Erickson --- diff --git a/NOTES.adoc b/NOTES.adoc index 7fc2e99cb..3bd8c406d 100644 --- a/NOTES.adoc +++ b/NOTES.adoc @@ -58,6 +58,9 @@ ng build [--dev|--prod] Observabes are better suited to shuffling data, particularly streams of data. * RouteResolvers only want a single value from an observable. Unclear why. * Observables not observered are not executed!! +* route changes that do not result in a new component being loaded + do NOT force running components to reload! you have to watch + for route changes. * Use 'declare' to tell TypeScript about global, legacy/non-exported variables, e.g. opensrf libs. @@ -94,6 +97,7 @@ set foo(str: String): void {this.foo = str} *** ng build --aot --i18nFile=src/locale/messages.fr.xlf --i18nFormat=xlf --locale=fr *** Final build only contains french strings. ** can drop the egStrings module + ** keeping all files within the Ang2 universe makes things like IDEs possible === Services and Classes === * Many services can just be classes @@ -147,11 +151,14 @@ import * as $ from 'jquery'; [source,sh] ------------------------------------------------------------------------ - - FallbackResource /ang2/index.html + + FallbackResource /webby/index.html ------------------------------------------------------------------------ +== per-component css +* surprisingly handy + === angular-cli * Compiling code bundles * Minifying @@ -185,3 +192,14 @@ directive. * Add an ang5 service and use from the angjs directive. * Add an angjs service and use from ang5 component. + +== 0 to 60 + +* Install Evergreen working/lp1626157-ang2-sandbox +* Edit eg_vhost.conf (see fallback resource above) +* mkdir Open-ILS/web/webby +* opensrf: ln -s /home/berick/code/Evergreen/Open-ILS/web/webby /openils/var/web/webby +* sudo npm install -g @angular/cli +* cd Open-ILS/webby-src +* npm install +* ng build --deploy-url /webby/ --base-href /webby/ --output-path ../web/webby/ --watch