WebCake WebCake


Web Development by Colin J Lacy



Subscribe:

Enter your email address to receive notifications of new posts by email.

Category: Dev Tools

Better Dynamic Import Paths in Webpack

Categories:

About six months ago I started playing with Webpack in hopes to find a clean way to build multi-platform support into our code base at work. This was based on Webpack 1, and while I did find a way (and even wrote about it), I wasn’t entirely thrilled with how it worked at scale. So …Read More

Posted: August 7, 2017

Dynamic Import Paths in Webpack Using Resolve Alias

Categories:

While the solution in this post does work, I personally didn’t like it at scale, so I found a different solution that I felt works much better. You can find out more about that in a newer post. I’ll leave this one up as an alternative should anyone choose to go with this solution instead. …Read More

Posted: January 14, 2017

User-Selected Style Themes in an Ionic 2 Application

Categories:

Earlier this week a conversation about theme selection in Ionic 2 applications came up. For example, if you’re using a game and want the change the colors based on where the user might be in the game. Or, in the app I’m working on at the office, where the user needs to be able to …Read More

Posted: July 2, 2016

Using Firebase 3 in Angular 2 and Ionic 2

Categories:

Not too long ago I wrote a post about getting Firebase installed in your Ionic 2 app. Well, last week Google had their I/O conference, which debuted the next major release of Firebase, v3, which comes with some significant changes. In this post, I’ll go through the same topics I covered in the first one, …Read More

Posted: May 27, 2016

A Spinner Component Using View Encapsulation in Angular 2

Categories:

A few weeks ago I wrote a post about how to create an inline spinner for your templates based on a loading state. While that’s still a viable solution, I ended up being my own devil’s advocate and building an alternative that I actually disagreed with at the time, and now find it to be …Read More

Posted: May 14, 2016

Listening for Pause and Resume Events in Ionic 2

Categories:

When my Ionic 2 app went into beta, I learned a lot about app usage that I think I might have taken for granted over the years. One of the biggest facepalm moments came when one user told me that when she opened the app every morning, it would always show yesterday’s data and not …Read More

Posted: April 30, 2016

Using Firebase 2 in an Ionic 2 Application

Categories:

This post is based on Firebase 2. About a week after writing it, Google announced Firebase 3. I’ve since written another post that explains how to use Firebase 3 instead. In this article I’ll show how I was able to get Firebase integrated into my Ionic 2 application. This was a great way to stand …Read More

Posted: April 21, 2016

A Loading Spinner in Angular 2 Using ngSwitch

Categories:

One of the challenges of Angular 1.x template rendering was the possibility of a digest cycle attempting to process an object property when an object was not yet defined. This would inherently throw an error, and would break Angular. There were probably a lot of solutions to this, but for me a simple ng-if attribute …Read More

Posted: April 16, 2016

Exploring Nav Hierarchy in the Ionic 2 Tabs Page

Categories:

Recently I added a login workflow to my Ionic 2 app, where the user has to log in before they can take any other action. If the user is already logged in when they open the app, they’re automatically redirected to the main view. In this case, the main view is the TabsPage layout. This …Read More

Posted: March 17, 2016

Add PouchDB to an Ionic 2 app via Webpack

Categories:

This post is now irrelevant, as the Ionic team replaced Webpack with Browserfy in their Beta 4 release. However, if you’re customizing to use Webpack, feel free to read on. In this post I’ll walk through how I got PouchDB working as part of the Webpack compilation process in an Ionic 2 project. There are …Read More

Posted: February 14, 2016

Let’s Build a Ticker in Ionic 2

Categories:

I have a buddy who’s pretty bad at keeping track of his diet, and I’m pretty sure I know why. His wife showed me the 8.5″x5.5″ 7pt. font print-out of their weekly diet plan, complete with 4mm-wide checkboxes, and I had the immediate urge to help them out with a super-simple app that accomplished the …Read More

Posted: January 13, 2016

Binding Data to Toggles and Checkboxes in Ionic 2

Categories:

At the time of this writing, the Ionic 2 docs don’t give much insight into how we can bind data to their ion-checkbox and ion-toggle components. So, I thought I’d go ahead and put up a code example of how I was able to get it working. This demo will load data through an HTTP …Read More

Posted: December 31, 2015

Page Lifecycle Hooks in Ionic 2

Categories:

The v1 docs on the Ionic site specifically tell us that when we navigate between views, our view isn’t destroyed or removed from the DOM. Instead, it’s cached. If we have page load events that we need to trigger when a user navigates to a page, we’ll need to either handle it with an event …Read More

Posted: December 30, 2015

First Thoughts on Ionic 2

Categories:

If you’re familiar with Angular 1.x, you’ve probably at least stumbled across Ionic at one point or another. It’s an amazing framework that creates hybrid cross-platform apps out of Angular 1.x projects, adding custom directives specifically built for touch-screen UI. With Angular 2 in beta, it would only make sense that those of us who …Read More

Posted: December 29, 2015

Sending HTTP Requests from a Node Application

Categories:

Node comes with some pretty awesome features, something that’s been well documented and widely accepted.  These days even some long-time Java devs that I know are pretty excited at how quickly something can be done server-side with Node, and the ES6/2015 features are making a lot of the old-guard naysayers come around. That being said, …Read More

Posted: December 14, 2015

Building a Yeoman Generator

Categories:

When I sat down a few weeks ago to write my first Yeoman generator, I was pretty surprised by the lack of resources available beyond the basic Yeoman documentation. While the API docs were decent, the Getting Started section wasn’t. Most of the learning was done on my own. Hopefully this will help other people …Read More

Posted: December 5, 2015

My Gripe with Yeoman

Categories:

To be specific, this isn’t so much a gripe with Yeoman as it is a gripe with the way in which some people use open-source Yeoman generators. As I’ll discuss at the end of the post, Yeoman is an amazing tool which can yield incredible results in decreasing development time, but only when used wisely.  So …Read More

Posted: November 29, 2015

Installing MongoDB on a Mac

Categories:

I like Mongo for running PoC projects where I need a quick database and don’t know how database is going to grow.  It’s fast, works with JSON, and I don’t have to worry about fields being null or being of a certain data type. While helping a coworker install the Private Bower locally, I realized …Read More

Posted: November 21, 2015