Configure URL from server before http-request in Angular

Configure URL from server before http-request in Angular

For an angular application which is deployed inhouse to several customers,
the application has to figure out, where the backend server exists.

Setting the url in the environment was not useful, as each customer needs
his own url and this would end up in big build scripts.

Also the customer could not reorganize the server names on his own, without
breaking the application if he chooses to change the server name.

So we tried to be clever and to figure out where the server might be in
loading a configuration file from an untouched json file in the application.

find json file with url in application diagram

Or

Read More

Angular ControlValueAccessor by example

Angular ControlValueAccessor by example

At sLAB we currently develop an angular client for the sMOTIVE product. We wanted to extend some form controls with own behavior and had some issues with the ControlValueAccessor.

The ControlValueAccessor is Angulars interface to interact with a form control.

I did some investigations with plunker to address those issues.

plunker screenshot

  1. Outer component containing the form.
  2. Shows the properties of the form and the 'business model' (value).
  3. The form control implementing the ControlValueAccessor interface.
  4. These buttons trigger changes inside the control.
  5. The buttons trigger changes from the outer component.

my-input.component.ts

export class MyInputComponent implements ControlValueAccessor {
  myValue: any = null;
  propagateChange

Read More

Migrating t5-kletterkurs.de to Angular 2

Migrating t5-kletterkurs.de to Angular 2

As my company decides to evaluate Angular 2 as our new framework to build our web application, I thought it would be a good experience to migrate one of my own projects to Angular 2.

  1. t5-kletterkurs.de
  2. Old version
    2.1 Screenshots
  3. New version
    3.1 REST
    3.2 Angular 2
    3.3 Clarity Design System
    3.4 Screenshots

1. t5-kletterkurs.de

Geocaching is a kind of sport, where people can search for little containers with the help of GPS. Some of those containers are only reachable with professional climbing stuff.
On this site, people can order a workshop for

Read More

Kotlin and TornadoFX

Kotlin and TornadoFX

Kotlin

As I have changed the JSON for configure the SmartCSV.fx from my own Schema to JSON Table Schema, I had to provide a converter for existing configurations.

I wanted to write less code than I typically do in Java and learn something new. Therefor I started a new project in Kotlin a programming language invented by JetBrains, the people behind the excellent IntelliJ IDEA IDE.

To make my life even easier, I use klaxon a JSON parser for Kotlin, which allows a very simple way to access JSON artefacts.

{
  "headers": { "list": ["COLUMN 1","COLUMN 2","..."] }
}
val headers = root.

Read More

SmartCSV.fx version 0.9

SmartCSV.fx version 0.9

The newest version of SmartCSV.fx has some major changes.

Support of JSON Table Schema

With version 0.8 the application supports a subset of the JSON Table Schema defined by Open Knowledge International.

Dan Fowler draws my attention to the spec of JSON Table Schema.

@frosch95 Hi! Great work! Have you seen our spec for defining a schema in JSON for CSV data? specs.frictionlessdata.io/json-table-sch…

And I noticed that the most of my verification rules were the same as in the spec. So I decided to switch from my own JSON definition to the JSON Table Schema.

Read More