Working on angular, fixed bug with database submission