hello.js

var please = require('share');
console.log('thank you');

NEW !!!

Monday, 12 February, 2018 UTC

Testing Reducers in NGRX Store

Next in this series, we’re going to learn how to test Reducers in NGRX Store. In the previous testing post we explored Testing Actions. As we know, Reducers are just pure functions. This makes it extremely easy to test your reducers - which control state ... more


Friday, 9 February, 2018 UTC

Testing Actions in NGRX Store

In this small NGRX Store testing series, we’re going to learn how to test Actions, Reducers and Selectors. Let’s begin with Actions, of more specifically Action Creators and how to test them. Table of contents Testing Actions What we’ll test Spec File ... more


Thursday, 18 January, 2018 UTC

Angular Classes with NgClass

With Angular, we have many approaches to adding, removing, toggling classes. We can choose single classes and bind a property, or we can use the awesome NgClass directive from Angular. In this post, we’ll explore class bindings, and also Angular’s NgClass ... more


Sunday, 14 January, 2018 UTC

Typing Arrays in TypeScript

There are many ways we can type a property to declare to TypeScript something is an array, or contains an array of “something”. We have generic types, array types and type assertions. For the purposes of this article, we’ll simply use a TypeScript class ... more


Saturday, 13 January, 2018 UTC

Step by Step Custom Pipes in Angular

Angular has many Pipes built-in, but they only take us so far. Ideally we’d like to extend our applications by creating custom Pipes. Custom Pipes (previously Filters in AngularJS) allow us to essentially create a pure function, which accepts an input ... more


Friday, 12 January, 2018 UTC

Handling Observables with NgIf and the Async Pipe

Dealing with async operations with the async pipe takes care of subscribing to Observable streams/async stuff like Promises for us. There are a few common gotchas when dealing with purely cold Observables that somewhat pull in data (over perhaps, Http). ... more


Thursday, 11 January, 2018 UTC

Angular's NgIf, Else, Then - Explained

Using the ngIf directive allows us to simply toggle content based on a conditional. But is it as simple as we think? Not quite, the directive has a heap of helpful syntaxes that can help us deal with conditionals far better, and also asynchronous objects ... more


Tuesday, 9 January, 2018 UTC

Introduction to TypeScript

Since its inception, JavaScript has experienced monumental growth - especially in recent years. The language has expanded its application domain far beyond the browser. It is now used to power backends, create hybrid mobile applications, architect cloud ... more


Friday, 22 December, 2017 UTC

Classes vs Interfaces in TypeScript

Classes and interfaces are powerful structures that facilitate not just object-oriented programming but also type-checking in TypeScript. A class is a blueprint from which we can create objects that share the same configuration - properties and methods. ... more


Wednesday, 20 December, 2017 UTC

NGRX Store: Understanding State Selectors

Selectors are pure functions that take slices of state as arguments and return some state data that we can pass to our components. To better understand what selectors are and what they do, it helps see ngrx state as a data structure - a tree that can ... more


Saturday, 16 December, 2017 UTC

NGRX Store: Actions versus Action Creators

Actions in the Redux paradigm are the initiators of the one-way dataflow process for state management. Once an action is triggered, or rather dispatched, the process is kicked off for new state to be composed - which is typically composed by the payload ... more


Thursday, 14 December, 2017 UTC

Finally understand Redux by building your own Store

Redux is an interesting pattern, and at its core a very simple one - but why does it feel complex to understand? In this post, we’re going to dive into Redux by assembling our own custom Store, written in TypeScript. Table of contents Terminology Actions ... more


Tuesday, 26 September, 2017 UTC

Exploring set(), get() and Object.defineProperty() in TypeScript

When working with Javascript or TypeScript, you may have seen the set and get keywords being thrown around in various blogs or codebases - and they’re extremely useful for parsing or modifying data that’s about to be set on a particular object. In this ... more


Thursday, 24 August, 2017 UTC

Preloading ngrx/store with Route Guards

Using ngrx/store (and some love for ngrx/effects) is definitely a great step for my productivity when managing state in Angular, and I want to share a small setup that’ll allow you to preload data as normal with a Route Guard. The interesting thing is ... more


Monday, 17 July, 2017 UTC

Lazy loading: code splitting NgModules with Webpack

Let’s talk about code splitting in Angular, lazy-loading and a sprinkle of Webpack. Code splitting allows us to essentially break our codebase down into smaller chunks and serve those chunks on demand, which we call “lazy loading”. So, let’s learn how ... more


Wednesday, 17 May, 2017 UTC

RxJS: Observables, observers and operators introduction

RxJS is an incredible tool for reactive programming, and today we’re going to dive a little deeper into what Observables and observers are - as well as learn how to create our own operators. If you’ve used RxJS before and want to understand some of the ... more


Tuesday, 11 April, 2017 UTC

Introducing ngErrors, declarative form errors for Angular

I’ve been working on an open source project to bring better validation to Angular’s reactive forms. In this post we’ll take a look at how to use it, why I created it and the problems it aims to solve. Go to GitHub repo Table of contents What is ngErrors? ... more


Monday, 6 March, 2017 UTC

Angular constructor versus ngOnInit

Angular has many lifecycle hooks, as well as a constructor . In this post, we’ll quickly cover the differences between the ngOnInit lifecycle hook which has been the source of some confusion for those getting started with Angular. So, why do we need ... more


Wednesday, 22 February, 2017 UTC

Getting started with Angular's component Router

Angular’s component router acts as the main hub of any application, it loads the relevant components relevant to the route requested, as well as dealing with fetching the relevant data for that particular route. This allows us to control different routes, ... more


Wednesday, 1 February, 2017 UTC

Angular ngFor, <template> and the compiler

Angular ngFor is a built-in Directive that allows us to iterate over a collection. This collection is typically an array, however can be “array-like”. To demonstrate this, we’ll be using Rx.Observable.of() to initialise our collection with an Observable ... more


Thursday, 26 January, 2017 UTC

A deep dive on Angular decorators

Decorators are a core concept when developing with Angular 2 and above. There’s also an official TC39 proposal, currently at Stage-2, so expect decorators to become a core language feature soon in JavaScript as well. Back to Angular, the internal codebase ... more


Tuesday, 24 January, 2017 UTC

Mastering Angular dependency injection with @Inject, @Injectable, tokens and providers

Providers in Angular are key to how we develop our applications, and injecting dependencies can be done in various ways. In this post, we’re going to debunk some terminology behind the @Inject() and @Injectable() decorators and explore the use cases ... more


Friday, 20 January, 2017 UTC

Should you learn Angular 1.x or 2?

A question that I’m frequently asked, “should I learn Angular 1 or 2?”. I hope this post offers some insight, help and guidance into answering that question for you. No one can answer it directly, because it’s specific to yourself, so here are some thoughts. ... more


Tuesday, 20 December, 2016 UTC

TypeScript: the missing introduction

The following is a guest post by James Henry (@MrJamesHenry). I am a member of the ESLint Core Team, and a TypeScript evangelist. I am working with Todd on UltimateAngular to bring you more award-winning Angular and TypeScript courses. The purpose of ... more


Wednesday, 14 December, 2016 UTC

Building Tesla's battery range calculator with Angular 2 reactive forms

In this epic tutorial, we’re going to build some advanced Angular 2 components that rebuild Tesla’s battery range calculator and then compile it to AoT and deploy on GitHub pages. We’ll be using the reactive forms API as well and building custom form ... more


Tuesday, 6 December, 2016 UTC

Angular 1.6 is here, this is what you need to know

Angular 1.6 is in the final release candidate stage and is coming this week. Here’s the low down on what to expect for the component method changes as well as an amazing new ngModelOptions feature. The purpose of this article is to focus on the most ... more


Friday, 18 November, 2016 UTC

Dynamic page titles in Angular 2 with router events

Updating page titles in Angular 1.x was a little problematic and typically was done via a global $rootScope property that listened for route change events to fetch the current route and map across a static page title. In Angular 2, the solution is far ... more


Wednesday, 16 November, 2016 UTC

Updating Angular 2 Forms with patchValue or setValue

Setting model values in Angular 2 can be done in a few different ways, however with reactive forms things are extremely easy to do with the new form APIs. In this post we’ll dig a little deeper as to the differences between patchValue and setValue in ... more


Thursday, 10 November, 2016 UTC

Please stop worrying about Angular 3

Another Angular version planned already? Whaaaat? Didn’t Angular 2 just ship? Why Angular 3? What? Why? First off, there is no massive rewrite, and won’t be for Angular 3. Secondly, let me explain the future of Angular 2 and what Angular 3, Angular 4 ... more


Friday, 4 November, 2016 UTC

Modern Angular 1.x essential interview questions

Angular 1.x has changed a lot with 1.5 introducing .component() , and with this it brings a whole new light to interviewing. At many previous jobs I’ve interviewed many developers on Angular, JavaScript in general and combining the two. This is my list ... more