August 14, 2017

Angular HTTP Testing “SyntaxError: Unexpected token o in JSON at position 1”

tl:dr; Solve this Issue: Add the following line to your imports:

  Full version: A common problem affecting many developers when writing tests for the Angular 4 HTTP service is the following stack trace. It occurs if you assemble an response using a the wrong class. The call of .json()will throw the error.

[…]
READ MORE

Admin Admin
Developer at thecodecampus </>


April 3, 2017

JavaScript Running On A Wearable? Yes, And Its Native.

A while ago some folks asked me, if it’s possible to use NativeScript and Angular with Android Wear. tl:dr; It’s possible, easy to setup in 5 steps and with FlexBox in NativeScript you can even handle small screens. NativeScript is a framework to build truly native apps for iOS and Android based on JavaScript. Furthermore it plays […]
READ MORE

Admin Admin
Developer at thecodecampus </>


March 13, 2017

What we learned in 1 year of Angular 2 trainings

When we founded theCodeCampus.de in 2014 we had some year’s experience in developing angular 1 applications. We also had a few years’ experience of doing trainings for Eclipse RCP. Last year we added our angular 2 trainings, months before angular 2 was finally released! We were really surprised how well it was received, but also […]
READ MORE

Jan Blankenhorn
Developer at thecodecampus </>


October 17, 2016

Angular 2 use ngSwitch ngIf ngFor without additional DOM Element

Probably you want as little DOM elements as possible. You can use a ng-container instead of a regular HTML element in order to receive reduced markup. Example of ngSwitch:

Example for *ngIf:

 

Admin Admin
Developer at thecodecampus </>


October 7, 2016

Angular 2 Animate.css Tutorial – How to use Animate.CSS in NG2 Application?

This Article will serve as a guide to implementing Animate.css animations with Angular 2 animation system. Animate.css is a popular and handy library for simple CSS Animations. We’ll apply the animation to a component and control it via a button. We will not use ngClass but convert the Animate.css to fit Angular 2 Animate. Final Result:   Git […]
READ MORE

Admin Admin
Developer at thecodecampus </>


September 27, 2016

Angular: Set Focus on Element

Want to set focus on an HTML element in your Angular app? The following step-by-step tutorial shows you how to do it easily. For a live demo of the final result, see this StackBlitz. Step-by-step Let’s start by adding an input element and a button to our component’s template. We give the input element an […]
READ MORE

Admin Admin
Developer at thecodecampus </>