fix function update issue angular