Posts

Showing posts from August, 2015

Upgrading Angular app to Twitter Bootstrap v3

We upgraded to the latest version of Twitter Bootstrap v3 a few months in the summer of '15. We were using a mix of bootstrap.js, angular-strap and ui-bootstrap for various widgets. In some cases they were conflicting with each other. In addition we had customized some 3rd party libraries, (in some cases for reasons no longer relevant). So as well as upgrading Bootstrap we wanted to cleanup and reduce our library dependencies. We use Flatui a ui style library which sits on top of bootstrap. Here's what our tech stack looks like now: Upgraded to twitter Bootstrap v3.3.5 using the style files only (not bootstrap.js) Upgraded to Flatui pro 1.3.2 (for css and js for checkbox/radios only) Upgrade ui-bootstrap to v0.12.0. Standardized on ui-bootstrap for both <select> and dropdowns (as well as other widgets such as dialogs). This means we don't need twitter bootstrap.js nor do we need angular-strap files any more. So far we have removed net 11 3rd party library fi

javascript ES6 notes

yeahhh! ES6 here and its good ES6 is latest approved version of javascript Lots of cool new features added to the language ES6 is here, but Browsers are still adding support *Notice red, click cell to see details Checkout MS Edge!, not bad support for ES6 So what to do if I want to write ES6 now? Use a transpiler, e.g. babel.js, traceur, typescript etc to write in ES6 and then covert it to ES5 using the transpiler (e.g. grunt task) I've been reading Exploring ES6 a free online book by Alex Rauschmayer (thanks Alex!) I use babel.js repl tool to do simple real time coding for examples. let and const let and const replace var let and const are block scoped, not function scoped like var but there are some differences so need to be careful if changing old code because let and const are not hoisted like var const variables cannot be changed; use them for immutable vars let and const mean we don't have to use IIFE to create local variables (can just use a block