Skip to content

Developing frontend

MajoBerger edited this page Mar 20, 2024 · 7 revisions

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
Clone this wiki locally