Skip to content

Developing frontend

Ondrej Kosarko edited this page Jun 18, 2024 · 1 revision

How to debug disappearing HTML element

  1. Open console
  2. Type in setTimeout(()=>{debugger;},5000); // after 5 seconds debug mode will be started where element should pop up
  3. Press Enter

How to test async observables

  1. Use fixture.whenStable().then(() => {
  2. Maybe it throw error An error was thrown in afterAll then check this stackoverflow thread. afterEach(() => {fixture.destroy();}); solved this error.

Frequent test error:

this.translate.get is not a function - maybe do not define a new translateServiceStub but use TranslateModule.forRoot(), in the imports.

Disable SSR

It is possible to disable SSR in production by using

environment:
  universal:
    preboot: false

SOMETIMES HOWEVER, FOR WHATEVER REASON, THE CONFIG FOR THE VERY SAME THING IS DIFFERENT:

universal:
  preboot: false

DO NOT ASK ME WHY, FOR I DO NOT KNOW. TRY BOTH VARIANTS, AND SEE IF ANY WORKS. HOW AND WHY IS IT SUDDENLY CHANGED LIKE THIS.

Clone this wiki locally