Added the ngSubmit functionality