Angular 2 RC5 to Angular 2.0 Final: Migration Gotchas


I recently started developing in Angular using Typescript. I started with Angular 2 RC5 (release candidate 5). Just last week, Google announced the live release of Angular 2.0. I spent the past couple days making my app, thus far written with Angular 2 RC5, work in Angular 2.0.

This post consists of a quick review of how I migrated and a summary of the changes that I needed to make to my code in order for it to work in 2.0. This is not meant to be an exhaustive list of what anyone needs to do – that depends on what functionality you are utilizing. I am posting it in hopes that it will help others. The topics I will cover are:

How I Migrated:

First, I followed the quick 5-minute quickstart to build a new Angular 2.0 app that Google has on their website here. Then I simply kept the node_modules folder and the package.json and deleted everything else. I then copied all the application files that I had in my RC5 environment to the folder with the 2.0 package.json and node_modules folder. I then ran npm start and debugged the errors as they showed up.

To be able to figure out what needed to change, I wound up creating yet another 2.0 environment and making it most of the way through the more in-depth Tour of Heroes tutorial on Google’s site. I then compared my app files from RC5 to the recommended 2.0 files (with the npm start and console.log error messages guiding where to look).

Changes to your main routes.ts file:

(or whatever you have named the file that contains your routes)


import { RouterConfig } from “@angular/router”;


import { Routes, RouterModule } from “@angular/router”;

Add this import:

import { ModuleWithProviders }  from “@angular/core”;

The code to create the routes should look like this:

const appRoutes: Routes = [


path: “”,

component: AppComponent



path: “about”,

component: AboutComponent



Add this at the bottom of the file (after the end of the array that lists your routes):

export const routing: ModuleWithProviders = RouterModule.forRoot(appRoutes);

Changes to app.module.ts:


import { routes } from “./routes”;


import { routing } from “./routes”;

Note that this “routing” is exported in the last line of the routes.ts file, as described above.


import { HTTP_PROVIDERS } from “@angular/http”;


import { HttpModule } from “@angular/http”;

  • remove the HTTP_PROVIDERS from the providers section in the @NgModule
  • add “HttpModule” (without quotes) to the imports section of @NgModule decorator
  • add “routing” (without quotes) to the imports section of the @NgModule decorator

If you are using Forms functionality, then add this import line:

import { FormsModule } from “@angular/forms”;


  • add “FormsModule” (without quotes) to the imports section of the @NgModule decorator

Still in your app.module.ts :

  • Make sure you have imported every Component from the file you export that Component.
  • make sure that the declarations section in the app.module.ts file includes all of your components that have been imported.

Changes in other components:

remove these lines from every component.ts file:

import { FORM_DIRECTIVES } from “@angular/common”;

and take out the directives section from the @Component decorator:

    directives: [



remove all of these lines from every component.ts file:

import { HTTP_PROVIDERS } from “@angular/http”;

How Blockchain Technology Can Improve the Economy of Sub-Saharan Africa




By providing a banking alternative and a reliable record of land ownership, blockchain technology could be used to improve the economy in Sub-Saharan Africa. Access to saving and transferring money and reliable land ownership records are two areas that are important to economic  growth where Sub-Saharan Africa is lagging behind the rest of the world. Two reports from the World Bank support this hypothesis.

First, as a banking alternative. According to a 2014 report from the World Bank (the most recent data available), only 29% of the Sub-Saharan population has a bank account. The world average is 61%. The same report shows that a whopping 12% of the population has a mobile payment account – the world average is 3%. So few people with bank accounts and so many with mobile-payment solutions in their pockets makes this population the most mobile-payment friendly contingency on the planet.

The need for quickly and safely sending money to family and friends, as well as the ability to easily pay for goods and services has driven the demand for mobile-payment solutions in the region. This demand is supplied largely by Vodafone’s M-Pesa offering in the region, first launched in 2007, and has seen many entrants into the rising market since. To give you an idea of the size, in 2013 it is estimated that approximately 25% of Kenya’s GDP went through M-Pesa (The Economist, 2013). The steps from mobile-payment to digital currency is a much shorter leap than stepping from a bank account and credit cards to digital currency. Both entail using a mobile device to send/receive money and have electronic wallets that can be exchanged with cash at given locations, in addition to linking the electronic wallet to debit/credit cards and bank accounts.

Because a cashless payment system already exists, it could be considered competition to blockchain digital currency solutions. For the opportunity to improve land ownership and access records, there is no current competition to what blockchain technology could provide. According to Hernando de Soto in The Mystery of Capital (and many other authors), land, and the equity growth that comes with it, creates the possibility for more people to build equity and participate in the economy. The more people that actively participate in a capitalistic economy, the better it is for the economy in general.

In 2015, the World Bank released the Smallholders’ Land Ownership and Access in Sub-Saharan Africa report. According to the report, in Sub-Saharan Africa today, the formal systems for tracking land ownership and access are cumbersome and unreliable. Citizens commonly resort to informal ownership/rental/leasing agreements, which allows for corruption and creates barriers to economic development. The authors state: “land markets will operate more smoothly if clear information on land ownership is available at low cost and social norms ensure that a landlord who temporarily transfers land through rental does not risk the loss of this asset”.

They go on to argue that an efficient trustworthy record showing the history of land acquisition and inheritance, that shows associated rights and rental and leasing history, with a record of the finances of the transactions to ensure accuracy would improve the ability of the majority of Africans to engage in economically productive and life-enhancing activities.

When records are stored on the blockchain, there is immutable proof of every transaction on the blockchain. This means that once a record shows an individual owns a given piece of land, it would be available information that cannot be falsified. If land is then rented or leased, that transaction can be recorded, signed by both the landlord and the renter/lessee. Any disputes about who owns what, who rents, who leases, can be resolved by looking at the record of transactions on the blockchain. If this is implemented correctly it could meet all the criteria called out for in the World Bank report. Namely, it would be clear information, could be made available at a low cost, and transactions could be efficiently stored and accessed.

Inheritance is an important mechanism in Sub-Saharan Africa land-ownership rights. With the advent of smart contracts on the blockchain, it can be recorded by a land-owner while living how the rights of their land will distribute when they die.

The World Bank report goes on to say that if more people in Sub-Saharan Africa are encouraged to participate in the land ownership and access process by making it more accessible and efficient, and they are treated fairly in it, it will provide economic leverage for individuals, society, and whatever company provides the technology that enables it. Likewise, if more people can store and save money and participate in financial transactions without using cash, it will be good for the individuals, the society, and whatever company provides the technology that enables it.

Blockchain technology has the capability to enable both banking alternatives and be a reliable source of information on land ownership. Turning the technology into a solution that meets the specific needs is the hard part.

Ethereum & Bitcoin Education

A few months ago, I wrote a blog post about the blockchain and Bitcoin. Since then, I’ve been learning more and more about these two technologies that exist together and becoming more and more fascinated by. In this post, I’ll explain a little about the Ethereum blockchain network, the type of folks I met at a local Denver Bitcoin meet-up, and end with a brief description of the documentary movie The Rise and Rise of Bitcoin.

Whenever I come across a new technology I want to know more about, one of the first things I do is find people I know who already know something about it. Recently, I found an old acquaintance, Raine Revere, who is a programmer and is currently under contract with a cryptocurrency company called ShapeShift to build a smart contract on the Ethereum blockchain network. As I mentioned in my previous post, the blockchain concept has spread beyond Bitcoin and is finding new applications. With every new blockchain network that is created, a new type of cryptocurrency is created to incentivize people with computing power to record new blocks on the chain. Every time a new block is created, they get rewarded with newly minted coins in the cryptocurrency of that particular blockchain.

Ethereum has the ability to create “smart contracts” on its network, an interesting feature. The Bitcoin network executes bitcoin transactions (sending bitcoins from point A to point B), though it’s capability beyond that is limited. On the Ethereum network, you can create scripts that contain more advanced logic. A simple example would be that you can watch for a certain market indicator (like the DOW hitting 8,000) and then trigger the selling of an asset.

The Ethereum blockchain currency, called Ether, is the second largest in the world, with Bitcoin’s market cap exceeding it by a wide margin. As of May 12, 2016, Bitcoin’s market cap is a little over $7 billion, and Ethereum is at $822 million. You can check for the existing money supply and market cap for most cryptocurrencies.

This friend of mine who is writing a new smart contract introduced me to the Colorado Bitcoin Society Meetup. This is a meet up of people who have an interest in Bitcoin. I went to my first meet up at Southern Hospitality in Denver this past Monday. It is no coincidence that the restaurant accepts Bitcoin payment, as the manager is an avid bitcoin enthusiast and investor, I’m told. Most people there are not just interested in Bitcoin, they are passionate about it. Quite a few categorized themselves as Libertarians, and when we did introductions around the room many people expressed their opinion that Bitcoin is an avenue to remove oneself from the government and the centralized Federal Reserve. This is a common theme among bitcoin enthusiasts, you hear terms like “the separation of money and state”. It’s quite an interesting group.

At the meet up, I was told about a documentary called The Rise and Rise of Bitcoin. It is a very well done movie detailing the origins of bitcoin and telling the story through the rise, the fall in value, and then the second rise of bitcoin. It does not require any technical expertise to be able to completely understand and enjoy the movie. It does a good job of introducing the technology at a high level, discussing the potential social and economic impacts of bitcoin, weaving in the story of a few bitcoin startups, and telling the personal story of an early bitcoin miner. It is available on Amazon Prime, and can be found on iTunes.

In future posts, my plan is to share more of the things I’ve learned, and give some details on my small adventures into the world of Bitcoin.





Reduce Mental Fatigue and Improve Sleep – With an App

Have you ever opened your laptop or turned on your phone in the pre-dawn morning with squinting eyes to shield your senses from the annoying light that radiates from the screen, rapidly turning the brightness down to reduce your discomfort? Have you noticed that turning the brightness down helps, but isn’t quite enough?

I am excited about an app I found that alleviates this, improves the visual experience of device use in general, and improves my sleep. It adjusts the color spectrum of light emitted from my screens to match the natural human morning/day/night biorythm. Specifically, when it is dark outside, it reduces a frequency range of light that is emitted by the sun and indicates daytime wakefullness to the body.

This band of visible light frequency is just below the frequency of Ultraviolet Light. It is at the transition point where energy in the form of invisible UV rays become visible light. It is called high energy visible (HEV) light.

There are apps that automatically adjust the HEV light (and brightness) from the screen depending on time of day, so you never open your laptop squinting again. In addition to making my devices better to use, studies suggest, and my own experience validates, that if you limit the amount of exposure to HEV light when the sun is below the horizon, you sleep better. It may also be that it is healthier for your eyes, possibly reducing macular degeneration with age. You can find much more info here, and many other places on the web.

There are a couple HEV filter apps out there. On my Mac, I use Flux – On my Android phone, I use Twilight. Note that if your screen oscillates between the filter being on and off, you may need to turn off the system setting to automatically adjust brightness. On a Mac, this can be found in display preferences.

Why “Do you have any questions?” is a Conversation Killer

When you are explaining something to someone (or a group of people) do you ever ask “Do you have any questions?” I recently learned that this is a good way to end that topic and move on to the next. If you want to increase the chances of stirring people’s thoughts that lead to more questions it’s better to ask “What other questions do you have?”

This is what my friend Jean Tabaka, a world renown collaboration thinker, taught me the other day. She has written a book on the topic (Collaboration Explained), is hired to facilitate meetings around the world, and is primary on the agile and collaboration speaking tour.

Jean is attending a workshop series on Satir systems that I am facilitating. We were nearing the end of a good teaching piece on using a contrary suggestion in order to elecit thought from someone who is stuck. Steven Young, the primary facilitator, asked “Are there any questions?”

Jean then pointed out the topic of this post – if you actually want a response, ask a more open-ended question. If you ask a question that can be answered by saying “no”, there is a greather chance that is what will happen. People will simply say “no, I don’t have any questions”, or think “no” and say nothing.

If you ask “What other questions do you have?”, you can’t just say “no”, or even “yes”. It invites thought and reflection, and is more likely to result in questions being asked. It gives less room for the participant(s) to say “no” and shut down.

I have extended this and altered one of my signature ending lines of emails to clients. Instead of saying “Let me know if you have any questions”, I now say “Let me know what questions you have”.

Once you’ve thought about this, let me know what questions you have about it.

Will “The Blockchain” Become as Ubiquitous as “The Internet”?

If you haven’t yet, you will start to hear about “The Blockchain”. In not too long, you will start to hear about it in much the same way you hear about “The Internet”. Read on if you want to learn more about this emerging technology that is ultimately going to change the way we work and communicate.

What is The Blockchain

The Blockchain started off as the technology underpinning bitcoin, which you’ve probably heard about. Bitcoin is a newly developed currency (since 2008) that you can use to buy and sell goods and services, as well as trade. The significant difference between bitcoin and every other currency that came before it is that there is no central authority in charge of it.

A Little Bit on Bitcoins

Bitcoins are traded on an “open ledger” technology, called blockchain technology, which is the type of technology used to build The Blockchain. The details of how it works are too complicated to share here (besides, I don’t even fully understand it). The significant aspect is that transactions are recorded by a network of computers that all participate in a process to agree a submitted transaction is correct. Once there is agreement, another “block” recording the transaction is added to the Blockchain. It is also important to note that any computer can participate in building the Blockchain. Compare this open network of agreement governing bitcoin to a nation’s currency that has a central bank which governs the currency.

How Blockchain Use is Growing

What is happening now is that many other types of transactions are being recorded on the Blockchain. The Economist had many articles about this recently. You can store contracts between parties, land ownership records, identity records – anything that needs to be tracked and authorized can be stored on the Blockchain. And instead of a central authority stamping the transaction (think of a deed on a house verified from the county records) it is the open ledger blockchain that is the authorizing party of the transaction.

A little more about how it works is that the servers participating in the network adding transaction blocks to the blockchain get paid in bitcoin when their block is accepted onto the blockchain. This payment is happening even for blocks on the blockchain that are recording something other than a bitcoin exchange. (Refer here for more information about how the blockchain is created).

Bitcoins are now serving the propogation of the blockchain, in all the multitude ways the blockchain is being used and will be used. Whereas when it was first released in 2008, it was the blockchain that was serving the ability to trade bitcoins.

Towards Blockchain Ubiquity

The chief of the US SEC made public comments about the blockchain and blockchain technology just a few days ago. You can read about it here. Note that she does not mention bitcoin at all. It is the blockchain that is the significant force at play.

The blockchain will become an integral part of where we store and retrieve information, information that will power how we work together and communicate. Think of a disagreement where two people have different records of what happened, and you consult the Blockchain to settle the difference. Think of automated processing on a given event, like when a death is recorded in the blockchain, the execution of the deceased’s will is triggered (this is already happening).

Once you start learning about this, it doesn’t take a lot of imagination to see how “The Blockchain” will become as ubiquitous as “The Internet”.

More Information

If you want more in depth information about this exciting space, there are a lot of articles being written. Here are just a few:

On the business and social implications: Forbes: Blockchain Will Break Free From Bitcoin to Power Distributed Apps

How the technology works and can disrupt: The Blockchain is the New Database, Get Ready to Rewrite Everything


Lesson from the Sydney Harbor Bridge: The Relationship Between Structure and Function

I was in Sydney earlier this month. When I visited in August, I found two old friends who live in Sydney, and we had a delightful reunion over dinner. They offered to host me at their house on my next visit. I took them up on it this time around. On our first day touring around, we went to the Sydney Harbor Bridge and took the tour up the pylon on the south side where there is a bridge museum.

harborbridgeThe museum did a great job depicting the environment of the area in the early 1900’s that led to the bridge’s construction from 1928 – 1932. It also explained the construction process. What became clear to me in going through the exhibit was the separation of the structural components of the bridge and the functional components of the bridge.

The bridge was built to serve one function – to go over the water to get from one side of the harbor to the other. That is possible because of the road (or platform) – the functional component of the bridge that is driven on, walked on, and railroad tracks are laid on.

Then there are structural components to the bridge. The arc being the most prominent. You don’t use the steel arc to get from one side to the other. However, the surface that is traversed would not be able to support the weight of the traffic on it without the arc.

bridgephasesYou can see the relationship clearly between these two components – the functional traversal surface and the structural arc by looking at the series of drawings here which showed the order and sequence of the bridge construction.

You can see the structural component was built first – the arc. Without the arc, nothing else of the bridge would be possible. The roadway was then hung from the arch, to allow for the bridge’s function of getting people to the other side.

It has me thinking about the relationship between structure and function – in physical manifestations, but more in organizational systems and even marketplace systems (multiple organizations and individuals exchanging goods, services, and ideas).

Questions to provoke thought: What is the function of the different systems you interact in and with? What are the structural components? What is the relationship between them?