client/app/containers/goatCreatorForm/goatCreatorForm.controller.js
// once added, we will go to the next page.
once added, we will go to the next page.
once added we will go to the next page .
addGoat() {
    if(!this.goat.name) return alert('Goat Name is Required');
    if(!this.goat.photo) return alert('Goat Profile photo URL is required');
    this.GoatsService.createGoat(this.goat);
    this.goat = {};
    this.$state.go('app.home');
  }
addGoat ( ) { if ( ! this . goat . name ) return alert ( 'Goat Name is Required' ) ; if ( ! this . goat . photo ) return alert ( 'Goat Profile photo URL is required' ) ; this . GoatsService . createGoat ( this . goat ) ; this . goat = { } ; this . $state . go ( 'app.home' ) ; }
once added, we will go to the next page.
once added we will go to the next page .
// reset the form // go to home page, to see our entry