samedi 18 juin 2016

ember.debug.js:40998Uncaught Error:

I am getting the following error

ember.debug.js:40998Uncaught Error: had no action handler for: addCase

component and controller files i have given

app/controller/new-case.js

import Ember from 'ember';

export default Ember.Controller.extend({

actions:{

addCase: function() {

  var location = this.get('location');

  var newCase = this.store.createRecord('case', {

   location : location

 });

newCase.save();

this.setProperties({

location: ' ', });

}

}

});

app/component/new-case.js

import Ember from 'ember';

export default Ember.Component.extend({

actions: {

submit() {

  if (Ember.isPresent(this.get('case.location'))) 

{

    this.set('mapIsShown', true);

  }

},

}

});

app/template/component/new-case.hbs

Location

       <button  type="button" class="btn btn-primary">Submit</button>

Cancel




Aucun commentaire:

Enregistrer un commentaire