Updated code for updated Angular version.