In this weekend side-hustle series, we’re building a Progressive Web App (PWA) for desktop and mobile that delivers WordPress content using Ionic, Angular, and the WordPress API. In Part 1, we got everything setup and working. In Part 2, we created a richer presentation of the WordPress Posts using Ionic cards. In Part 3, we implemented […]

In this weekend side-hustle series, we’re building a Progressive Web App (PWA) for desktop and mobile that delivers WordPress content using Ionic, Angular, and the WordPress API. In Part 1, we got everything setup and working. In Part 2, we created a richer presentation of the WordPress Posts using Ionic cards. In Part 3, we implemented […]

In this weekend side-hustle series, we’re building a Progressive Web App (PWA) for desktop and mobile that delivers WordPress content using Ionic, Angular, and the WordPress API. In Part 1, we got everything setup and working. In part 2, we created a richer presentation of the WordPress Posts using Ionic cards. Today, we’ll implement the single […]

In this weekend’s side-hustle series, we’re building a Progressive Web App (PWA) for desktop and mobile that delivers WordPress content using Ionic, Angular, and the WordPress API. In Part 1, we got everything setup and working. If you haven’t seen Part 1, I recommend that you start there. Today, for Part 2, we will convert the […]

Angular provides a Title service that you can use to set the title of a page. This is good, of course, for SEO. Here’s how to use it. import { Component } from ‘@angular/core’; import { Title } from ‘@angular/platform-browser’; @Component({ selector: ‘my-app’, viewProviders: [Title], template: `<h1>MyApp</h1>` }) export class MyAppComponent { constructor(private titleService: Title) […]

In Angular, to format a currency, use the currency pipe on a number as shown here. <tr *ngFor=”#item of data”> <td><a href=”#”>{{item.invoiceNo}}</a></td> <td>{{item.invoiceDate}}</td> <td>{{item.invoiceStatus}}</td> <td class=”right aligned”>{{item.invoiceTotal | currency:’USD’:true:’1.2-2′}}</td> </tr> The first parameter, ‘USD’, of the pipe is an ISO currency code (e.g. ‘USD’,’EUR’, etc.) The second parameter, true, is an optional boolean to specify whether or […]

Here’s how to get and print the index (or the iteration number) of the current item in an ngFor loop. In Angular, to get the index (or the iteration number) of the current item, add a second part to the ngFor expression (after a semi-colon) as shown here. <tr *ngFor=”#item of data; #ndx = index”> […]