I have several connected props.
Firstly:
App.Views.TreeGrowthBase = App.Views.TreeGrowthBase.extend({
events: {
'submit form': 'submitForm',
...
and then in the same file:
submitForm: function(e) {
e.preventDefault();
and elsewhere in the application:
App.Views.WineTreeGrowthBase = App.Views.TreeGrowthBase.extend({
submitForm(event) {
event.preventDefault();
My questions: In this last piece of code ... what is the syntax:
submitForm(event) {
event.preventDefault();
Is this a method call? Method definition? Where are the colons?
Which one has priority? I believe that the definition of the child method submitFormtakes place ... if this is the definition of a method?
source
share