made example work in latest angular version.