I hereby claim:
- I am esbanarango on github.
- I am esbanarango (https://keybase.io/esbanarango) on keybase.
- I have a public key whose fingerprint is 8087 A142 D24B 5A06 76B9 9F32 239F 5139 6604 FC41
To claim this, I am signing this object:
import Component from '@glimmer/component'; | |
export default class extends Component { | |
get aValueInfo() { | |
return `The value value is ${this.args.aValue}`; | |
} | |
get anObjectInfo() { | |
return this.args.anEngineer.handle; |
Assertion Failed: You accessed `this.field` from a function passed to the `fn` helper, but the function itself was not bound to a valid `this` context. Consider updating to usage of `@action`. |
import Ember from 'ember'; | |
import { set } from '@ember/object'; | |
export default Ember.Controller.extend({ | |
primitiveFruits: ['banana' ,'apple'], | |
wrappedFruits: [{name: 'banana'}, {name: 'apple'}], | |
printPrimitiveFruits() { | |
console.log(this.get('primitiveFruits')); | |
}, |
I hereby claim:
To claim this, I am signing this object:
<input> with attribute required
This attribute specifies that the user must fill in a value before submitting a form. It cannot be used when the type attribute is hidden, image, or a button type (submit, reset, or button). The :optional and :required CSS pseudo-classes will be applied to the field as appropriate.
How to show a spinner only when the required validations pass? (Without using any validation plugin, only the required attribute).
Form with a required input
= form_for @person, remote: true do |f|
= f.text_field, :first_name, required: true
Here at eSpark Learning, we use Jekyll to host our marketing site, https://www.esparklearning.com. Within eSpark Engineering, we love automated testing - most of our codebases require a passing test suite for all changes. As we add more javascript to our Jekyll site, we wanted to add a test framework that would give us real world tests - testing that the HTML was valid was no longer enough.
To create real world acceptance tests for our site, we used a few technologies we were familiar with:
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
cities: ['Barcelona', 'London', 'New York', 'Porto'], | |
destination: 'London', | |
actions: { | |
chooseDestination(city) { | |
this.set('destination', city); | |
// this.calculateRoute(); |
#include <map> | |
#include <set> | |
#include <list> | |
#include <cmath> | |
#include <ctime> | |
#include <deque> | |
#include <queue> | |
#include <stack> | |
#include <string> | |
#include <bitset> |
var promise = new Promise(function(resolve) { | |
Ember.run.later((() => { | |
resolve(); | |
}), 5000); | |
}); | |
return promise.then(() => { | |
return 'I was sleeping'; | |
}); |