Categories
AngularJS

Client-side PDF Generation with AngularJS

Creating PDF’s with Client Side JavaScript Sucks!

I’ve learned that creating PDFs with JavaScript is not easy but it can be done and can be done well.  It can be done using HTML/CSS/JavaScript.  In this post, I’ll be using AngularJS but I’ve seen how this can be done with Angular as well.  There can be a lot of gotchas especially if you need it to work on mobile.

So let’s get to it!

Categories
AngularJS

Filtering Input Fields in AngularJS

What did I learn today?

Today, I came across a situation where I needed to have an input field containing a phone number format the number on page load and during user entry.  Formatting the phone number while the user was typing was easy, all it took was a pattern attribute and a simple directive.  But when I tried to use a filter to format the phone number on page load, it was more difficult than I expected.  The normal filter syntax was not usable and caused the screen to error.

Because I spent an hour or two looking for the best solution, I decided to write this blog post to remind me how to do this six month from now when I need to do this again.

Categories
Android iOS Mobile Development Uncategorized

Create Multiple Builds for Ionic Mobile Apps Using Gulp

What did I learn today?

Today I learned that it is possible to create multiple builds for Ionic mobile applications using Gulp tasks in Visual Studio. In this post, I’ll explain how I accomplished this task using Gulp and a few Gulp plugins.

This post will explain how to setup multiple builds using Gulp for Ionic mobile apps.  The full example can be found on GitHub: https://github.com/bwhittington/Multi-Build-Gulp-Setup-Example

Categories
iOS Mobile Development

Opening Local Content On iOS Devices Using InAppBrowser

What did I learn today?

Today I learned that opening local content in InAppBrowser on iOS devices using the system browser (Safari) is impossible.  This is due to Apple’s security scheme setup to protect iOS devices from total security failures due to improperly secured applications.  This is a GOOD thing!  Without sandboxing, a hacker could exploit a vulnerability in an app to gain access to the entire device.

I’m going to explain how I chose to maintain current functionality of viewing content in an InAppBrowser while still giving the user the option to share the content using default mechanisms.