Skip to content

Instantly share code, notes, and snippets.

@pYr0x
Created May 11, 2017 22:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pYr0x/d4c767429bf9a622896cb2b78342bba4 to your computer and use it in GitHub Desktop.
Save pYr0x/d4c767429bf9a622896cb2b78342bba4 to your computer and use it in GitHub Desktop.
const VM = DefineMap.extend({
recipientPromise: {
type: "any",
value: function () {
return Mail.get({pruefbericht_id: 1, foo: "bar"});
}
},
recipient: {
value: {},
get: function (lastSet, resolve) {
this.recipientPromise.then(resolve);
}
}
});
{{#if recipientPromise.isPending}}
Loading...
{{/if}}
{{#if recipientPromise.isResolved}}
<div class="card-block">
<div class="form-group row">
<label class="col-sm-2 col-form-label">Empfänger</label>
<div class="col-sm-10">
<input type="text" class="form-control" {($value)}="recipient.mail" placeholder="E-Mail">
</div>
</div>
</div>
{{/if}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment