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 class="right aligned">{{item.invoiceTotal | currency:'USD':true:'1.2-2'}}</td>
  • 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 not you want to render the currency symbol (‘$’, ‘€’); default is false
  • The third parameter,'1.2-2', also optional, specifies how to format the number, using the same formatting rules as apply to the number pipe.

Note, however, that the currency pipe relies on the Internationalization API, which is not available in all browsers. See current browser support for Internationalization API.

Here’s a visual example of what the example shown above renders when used on a decimal number:

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">

Notice that I’m adding 1 to the output expression ({{ndx+1}}) because the index is zero-based. The data table row example shown above renders as follows:

Story structure diagram

Recently, I created a story structure diagram to help me visualize and plan as I work on a novel. There are plenty of story structure diagrams on the web, but I wanted graphic of my own so that I could use layers to overlay my own elements (character arcs, major events, and what-not).

LEGENDActs, PeriodsEvents, Points


  • ACT I – The Beginning
    • Hook – Grab the reader, provoke interest,and cause questions to be asked.
    • Inciting Event – The event that sets the story in motion, and will lead to the Key Event.
    • Key Event – The event that causes the protagonist to be caught up in the story.
    • Plot Point 1 – A change of surroundings. A personal turning point. The point of no return for the protagonist.
  • ACT II – The Middle
    • Strong Reaction – The protagonist has a strong response to the 1st Plot Point.
    • Pinch 1 – The antagonist’s presence and power are displayed.
    • Plot Point 2 – The midpoint. The turning point of the novel. A change of direction for the characters. A push from reaction to action. A personal catalyst for the protagonist. A move to dramatic, new, fresh, different circumstances. The true midpoint is not a scene. It’s a moment within a scene. It’s like the earth’s core. The true center. Find it in your novel, and everything will radiate from it. 
    • Strong Action – The protagonist takes a strong action after the Turning Point.
    • Pinch 2 – The antagonist’s presence and power are reaffirmed.
    • Plot Point 3 – We are setup on our inexorable course towards the Climax. A low point for the protagonist. Perhaps a meeting between protagonist and antagonist? A decision? An upheaval? An unexpected event?
  • ACT III – The End
    • Increased Pace – The pacing will naturally increase (and chapter length will decrease) as we approach the Climax.
    • Climax – The final 10% of the novel, where the core conflict between the protagonist and antagonist is brought to a conclusion.
      • Climactic Moment – The critical moment that fulfills the dramatic promise of the story.
    • Resolution – A brief hint (a scene or two) of how the story continues beyond the novel’s scope. A period of emotional recovery. A chance to spend another brief moment with the protagonist.


Although this is pretty standard for story structure, I’ve based it primarily on my study of the book, Structuring Your Novel: Essential Keys for Writing an Outstanding Story, by K.M. Weiland. She also has an excellent blog called Helping Writers Become Better Authors where you can find a treasure trove of tips on writing.

I also got some inspiration from Matt Gemmell’s own study on Weiland’s structure, which he documented in the article, Structuring Your Article.