fix bug & make it in angular way