Skip to content

Category Archives: Web Development

Install version of an NPM module: module-name@1.0.0-alpha

22-Aug-18

Installing specific version with npm by using npm install [--save-dev] module-name@1.0.0-alpha

New in JavaScript ES6

24-Jul-18

ES6 introduces new operators and concepts, like spread operator and Sets. Introduction to ES6+

Disable autocomplete automatically for all forms in AngularJS

13-Jun-18

When developing CRMs autocomplete is often useless or altogether detrimental. If you end up having a case where no element will ever need autocomplete, one of the fastest ways to achieve this is hooking an AngularJS directive to the form element: (function() { 'use strict'; angular .module('app.core') .directive('form', htmlFormDirective); function htmlFormDirective() { return { restrict: […]

Disable autocomplete for all input fields in a form

13-Jun-18

Autocompleting a field is great except when it's not. "However, some data submitted in forms are either not useful in the future (for example, a one-time pin) or contain sensitive information (for example, a unique government identifier or credit card security code). As website author, you might prefer that the browser not remember the values […]

AngularJS ng-repeat limitTo with Objects

13-Jun-17

<div ng-repeat="(key, value) in object | limitTo: 2"> will not work, as ngRepeat needs a string or an array to work with. A workaround is to use ng-if="$index < 2". <div ng-repeat="(key, value) in object" ng-if="$index < 2"> Do note that the order of keys for any given object may vary.