Replaced code by Angular code