== Writing a new app the Angular2 way to experiment ==
-* Install NodeJS v6
-[source,sh]
---------------------------------------------------------
-curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
-sudo apt-get install -y nodejs
---------------------------------------------------------
- ** See also https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions[NodeJS Install Docs]
* https://angular.io/tutorial
-** Angular2+ is AngularJS in Greek. Same concepts, new language.
-** Modules, Services, Directives+Controllers=Components
+ ** Angular2+ is AngularJS in Greek. Same concepts, new language.
+ ** Modules, Services, Directives+Controllers=Components
=== Typescript ===
* TypeScript is not required, but is almost universally assumed in
*** Final build only contains french strings.
** can drop the egStrings module
** keeping all files within the Ang2 universe makes things like IDEs possible
+ ** In the works for 5.x: translations for strings /in typescript code/ -- woohoo.
+ *** https://github.com/angular/angular/issues/11405
=== Services and Classes ===
* Many services can just be classes
}
------------------------------------------------------------------------
+== Integrated service workers
+ * Not yet researched
+
== Configure Apache for lazy-loading / nested modules
-* Assumes ng-build is compiling to /openils/var/web/ang2 (or symlinked)
+* Assumes ng-build is compiling to /openils/var/web/e2 (or symlinked)
* Another nod toward going all angular .html / no TT2 or EGWeb required.
== Nested routing
Resolvers proceed as expected, from the base components out to the
children.
+* egStartup.go() is broken out into route-specific data fetching /
+ it cascades down to each app:
+
+ ** load idl => verify auth / load common staff data => load app-specficic data.
+
* Base routes defined in root, child routes defined in child routing
module, and on down.
* 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
+* mkdir Open-ILS/web/eg2
+* opensrf: ln -s /home/berick/code/Evergreen/Open-ILS/web/eg2 /openils/var/web/eg2
* sudo npm install -g @angular/cli
-* cd Open-ILS/webby-src
+* cd Open-ILS/eg2-src
* npm install
-* ng build --deploy-url /webby/ --base-href /webby/ --output-path ../web/webby/ --watch
+* ng build --deploy-url /eg2/ --base-href /eg2/ --output-path ../web/eg2/ --watch
+
+==
+
+In a way, we're on a journey alongside the angular team. have a chance
+to review the /eg/ work and reassess some things.
+
+* many deps are the same as we're already using -- jasmine, karma
+
+== Integrationg JS to angjs
+ * main thing is
+[source,js]
+-------------------------------------------------------------------------
+var service = {};
+var service: any = {};
+# branch user/berick/lp1626157-webstaff-typescript
+-------------------------------------------------------------------------