lundi 30 janvier 2017

Ember Data not sending to server

I have the following code:

app/models/account.js:

import DS from 'ember-data';

export default DS.Model.extend({
  username: DS.attr('string'),
  birthdate: DS.attr('date'),
  gender: DS.attr('boolean'),
  emailaddresses: DS.attr()
});

and app/components/account-profile.js:

import Ember from 'ember';

export default Ember.Component.extend({
  buttonLabel: 'Send to Server',
  actions: {
    buttonClicked(param) {
      this.sendAction('action', param);
    }
  }
});

and app/templates/components/account-profile.hbs

<div class="box">
  <div class="title">Your Profile</div>
  <div>Username: </div>
  <div>Email Address: </div>
  <div>Birthdate: </div>
  <div>Gender: </div>
</div>
<div>
  <div>
    <label>Username</label>
    <div>
      
    </div>
    <label>Username</label>
    <div>
      
    </div>
    <label>Username</label>
    <div>
      
    </div>
    <label>Username</label>
    <div>
      
    </div>
    <div>
      <div>
        <button type="submit" ></button>
      </div>
    </div>
  </div>
</div>

I do not see any traffic being sent from from my web browser to my server.

What is missing and what's wrong with my code? What other things I need to do?




Aucun commentaire:

Enregistrer un commentaire