Bram's Dev Blog

home

100 Days of Code Day 68 - Translation Loaders

31 Oct 2018

Interaction between app.module.ts, browser-app.module.ts and server-app.module.ts

Yesterday I was wondering about the empty TranslateModule.forRoot(); import in app.module.ts. This lead me to think that DSpace 7 isn’t using a loader for the language files and I created a new issue to ask about this.

Turns out app.module.ts is not loaded directly, but is loaded to browser-app.module.ts when the app is executed in the browser, and in server-app.module.ts when the app is loaded on the server. The latter is required if crawlers/users can’t execute javascript on the client side.

Both of them specify a different loader

This all leaves me wondering about the following after today’s hour:

It’s really frustrating that the further I venture into this, the more complex and confusing it seems to get.

Day 68 Plan

Solve the dependency injection problems for the tests

Future days - DSpace 7 Angular

Future days - Analyzer.atmire.com work

Future Days - Productivity

Future days - Jekyll http://bram-atmire.github.io/ site

Future Days - Atmire.com work

Investigate and work on search engine optimization (SEO) for the main atmire.com website.

Future Days - Learning just for learning

Sustainability challenge - Finish before Christmas

If I continue like October, I could hit day 68 by end of October and day 98 by end of November.