Home » Tag Archives: javascript

Tag Archives: javascript

Debugging Angular 2 Applications from the Console

Learn how to access useful information from your Angular 2 components right from your browser’s console There have been some quite useful articles for how to debug Angular 1.x applications from the browser’s console. But how can we achieve the same in Angular 2? Is there even a way? Let’s see. I always found it quite neat how to debug ...

Read More »

Learning Angular 2: Creating a tabs component

A follow up on thoughtram’s excellent article on creating a tabs components with Angular 2 This is a follow-up article of thoughtram’s excellent article on developing a tabs component with Angular 2, where we’re going to explore an alternative way of creating a tab component by learning about @ContentChildren and AfterContentInit. That said, definitely read thoughtram’s article on how to ...

Read More »

Getting Visual Studio Code Ready for TypeScript : Part 1: Compiling TypeScript to JavaScript

This is the first part in a series of blog posts on Getting Visual Studio Code Ready for TypeSript: Compiling TypeScript to JavaScript (this post) Why TypeScript? In case you’re new to TypeScript, Wikipedia defines TypeScript in the following way (paraphrased): TypeScript is designed for development of large applications and transcompiles to JavaScript. It is a strict superset of JavaScript ...

Read More »

Learning Angular 2 – Conditionally add styles to an element

Here we’re going through a couple of ways to conditionally apply some styles to a DOM element in Angular 2. Directly manipulating styles property A rather unconventional way would be to return the styling property as a string and then to directly set it on the desired element: //our root app component import {Component} from 'angular2/core' @Component({ selector: 'my-app', providers: ...

Read More »

Multi Content Projection aka Multiple Transclusion

How named/multi-slot transclusion works in Angular 2 If you’re an Angular developer, I’m sure you heard about transclusion. Sounds really weird and mysterious, at least that’s what I thought when I first heard it. If you google for it, you’ll probably land on one of Thoughtram’s articles (as you’ll do 90% of the time if you search for Angular articles ...

Read More »

Top 4 Javascript Concepts a Node.js Beginner Must Know

Wouldn’t it be awesome if you only had to know one programming language for building a full stack application? Ryan Dahl put this thought into action and created Node.js. Node.js is a server side framework that is built upon Chrome’s powerful V8 JavaScript engine. Though originally written in C++, it uses JavaScript to be used in applications. See, problem solved. ...

Read More »

Improve your Angular 1.x startup time

This neat and simple trick originally appeared about a year ago on this blog post, so it’s not something I came up with by myself. Angular’s watcher functions for ng-bind and text nodes () put binding information inside the respective DOM elements using jQuery .data method. This is unfortunately a very expensive operation that impacts both load times and time ...

Read More »

Componentizing Workflow for Angular 2

A possible (mental) workflow to split up your static HTML into components Yesterday I wrote a tweet about how I usually create components. Great workflow for refactoring unwieldy components :-) https://t.co/each4c2cm9 — Kent C. Dodds (@kentcdodds) December 9, 2015 A tweet is quite short, so let’s take a closer look at such workflow in more detail. Also, note that I’m ...

Read More »

jq error – Cannot iterate over null (null)

I’ve been playing around with the jq library again over the past couple of days to convert the JSON from the Stack Overflow API into CSV and found myself needing to deal with an optional field. I’ve downloaded 100 or so questions and stored them as an array in a JSON array like so: $ head -n 100 so.json [ ...

Read More »