As I was scrolling through Twitter’s PWA (I assume this would be the same in their native application as well), I noticed that when you scroll down on a screen that has a “double toolbar” in the header: The top “toolbar” will animate off of the screen, leaving only the tab bar: This leaves more […]
↧
Creating a Custom Scroll Vanish Directive with Ionic Web Components
↧
Creating Custom Form Input Components with Ionic & Angular
A while ago I wrote a tutorial on building a custom input component for an Ionic application. It used an HTML5 <canvas> and a gesture listener to create a rating/satisfaction input component that looks like this: It was just a bit of a silly/fun component to serve as an example for learning about custom components, […]
↧
↧
Shadow DOM Usage in Ionic Web Components
Beginning with Ionic 4, all of Ionic’s components will be web components. Unlike previous iterations of the framework where the components were built using Angular, the move to web components means Ionic can now be used just about anywhere. One aspect of web components is the ability to define custom HTML elements, which basically means […]
↧
Anatomy of an Ionic 4 Project
A long time ago I recorded a video that covered the “anatomy” of an Ionic project, and now I have recorded a video in the same style to cover the anatomy of an Ionic 4 and Angular project. An intimidating number of files and folders are generated when you create a new Ionic project – […]
↧
Styling a Shadow DOM in Ionic 4
Since the release of Ionic 4, many of Ionic’s components now make use of a Shadow DOM. I’ve written about what exactly this means in another article, but the basic idea is that a Shadow DOM provides a component with its own isolated world to operate it – free from interference from the parent document. […]
↧
↧
Production/Development Environment Variables in Ionic & Angular
Often, our production environments are quite different to our development environments. Whilst your application is in development you might just want to make requests to a database running locally on your machine. When you are deploying the application to production you would want the requests to be made to the production database that lives on […]
↧
Navigation Basics & Passing Data Between Pages in Ionic & Angular
With the introduction of Ionic 4, we have seen a shift in responsibility for navigation from Ionic itself to whatever the underlying framework being used is. That means that if we are using Angular to build an Ionic application, then we should rely on Angular’s own concepts for navigation (even though it is still technically […]
↧
Dealing with CORS (Cross-Origin Resource Sharing) in Ionic Applications
Almost everybody who is developing Ionic applications will at some point or another run into a fun little error that looks something like this: The Access-Control-Allow-Origin error you see here is the result of the browser’s implementation of CORS (Cross-Origin Resource Sharing). This is an exceedingly common error, but it is also something that is […]
↧
Capacitor Workflow in an Ionic Application
Capacitor was built as an alternative to Cordova, and although much is similar in terms of its methodology, the workflow and commands you will use in a Capacitor application will look quite different to Cordova. In this tutorial, we start out with a simple Ionic application and walk through how to integrate Capacitor and how […]
↧
↧
When to Use Services/Providers/Injectables in Ionic & Angular
Services, which we might also refer to as providers or injectables, are a commonly used pattern in Ionic/Angular development. Services allow us to: Make methods/data available to multiple pages/components throughout our application Perform complex logic or interface with external APIs/Services Share a single instance of the service throughout the application, allowing for communication between pages/components […]
↧
An Introduction to NestJS for Ionic Developers
Creating a backend for your application has typically required a totally different skill set to what you might use for the front end. Over time, those lines have blurred as the likes of NodeJS and server-side JavaScript have risen in popularity. Now, with NestJS, you might not even feel like you are working on a […]
↧
Twitter Style Heart/Like Animation with Angular Animations in Ionic
In this tutorial, we are going to work on building an animated “like” button that will look like this when clicked: Since Ionic provides both a “full” and “empty” heart icon: It is easy enough to create an “on/off” or “liked/unliked” state for a like button that uses these icons – you would just use […]
↧
Live Coding a Party Game with Ionic – Part 1
In this video, I walk through building a “party game” using Ionic live on screen. With these types of videos, the emphasis is on dealing with issues as they arise and trying to capture how I would naturally build an application rather than having anything prepared beforehand. All I have going into this video is […]
↧
↧
Dynamic/Infinite Input Fields in an Ionic Application
Angular has fantastic support for forms, from the simple ngModel to the more robust reactive forms that make use of FormControl and FormGroup. Using ngModel allows us to bind input fields in the template to class members in our TypeScript files. Reactive forms take a similar approach except that we bind our form in the […]
↧
Using Providers and HTTP Requests in a NestJS Backend
In the previous tutorial, we covered setting up a simple NestJS server that communicated with an Ionic application. All we have done so far is create a simple controller in NestJS that responded with some dummy message data. At the moment, it looks like this: The purpose of the previous tutorial was to introduce you […]
↧
Live Coding a Party Game with Ionic – Part 2
In the previous tutorial, we started building an application live on screen that would display a series of questions to the user. So far, we have been able to display some dummy data to cycle through questions and change the background colour for each question. In this tutorial, we will finish the application off by […]
↧
Reordering List Items with Ionic Web Components
A while ago, I released a video that walked through how to reorder list items in Ionic 3. Now that Ionic 4 has been released, and just about everything has moved over to web components, the way in which we need to reorder list items has changed a little. In this video, we walk through […]
↧
↧
Building a Notepad Application from Scratch with Ionic
A difficult part of the beginner’s journey to learning Ionic is the step between understanding some of the basics and actually building a fully working application for the first time. Concepts explained in isolation can make sense, but it may be difficult to understand when to use them in the context of building an application. […]
↧
Sending Data with POST Requests to a NestJS Backend
In the previous tutorial, we focused on making a GET request from an Ionic application to a NestJS backend. A GET request is generally pretty simple, as all we are doing is making a generic request to a specific URL which will then return a response. In this tutorial, we are going to cover how […]
↧
Multi-File Upload with Ionic & Angular (Client-Side)
I’ve been building out some software recently that involves uploading a bunch of files at once to a server, so I figured it would be worthwhile to share the solution I ended up with in this blog post. The solution is based around using the ng2-file-upload package, but we will be building that into a […]
↧