Posts

ES6 arrow functions, syntax and lexical scoping

ES2015 (ES6) introduces a really nice feature that punches above its weight in terms of simplicity to integrate versus time saving and feature output. This feature is the arrow function. Before we dive into the features of the arrow function and what it actually does for us, let’s understand what an arrow function is  not . It’s not a replacement for the  function  keyword, at all. This means you can’t do a find and replace on every single  function  keyword and everything works perfectly, because it likely won’t. Table of contents Syntax Hint: arrows are anonymous Syntax: single line expressions Syntax: single argument functions Functionality: lexical scoping “this” If you’re competent with the way  JavaScript scope  works, and have a great understanding of lexical scope, the  this  keyword and Prototype methods such as  .call() ,  .apply()  and  .bind() , then you’re in good hands to continue reading. ...

Using Bootstrap with Angular

Image
Bootstrap is the most popular HTML, CSS, and JavaScript framework for web front-end development. It’s great for developing responsive, mobile-first web sites. The Bootstrap website is available at  http://getbootstrap.com/ . The Bootstrap framework can be used together with modern JavaScript web & mobile frameworks like Angular. In the following you’ll learn how to use the Bootstrap framework in your Angular project. Furthermore we’ll take a look at the Ng-Bootstrap project which delivers Angular Bootstrap components which can be used out of the box. Setting Up An Angular Project With Angular CLI First, let’s start with generating a new Angular project. The easiest way to do so, is to use the Angular Command Line Interface (CLI) to generate a new project. The Angular CLI project can be found at  https://cli.angular.io/ . First you need to make sure that Angular CLI is installed on your system. As Angular CLI comes as an NPM package the installation can be done by usi...