Skip to content

Instantly share code, notes, and snippets.

🐹
#TomsterOnTour

Dawid Pośliński PoslinskiNet

🐹
#TomsterOnTour
Block or report user

Report or block PoslinskiNet

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View controllers.application.js
import Ember from 'ember';
import { computed } from '@ember/object';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
test: computed('{bla,la}', function() {
return `${this.bla},${this.la}`;
}),
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
});
View components.github-user-search.js
import Ember from 'ember';
import { task, timeout } from 'ember-concurrency';
import { isBlank } from '@ember/utils';
const DEBOUNCE_MS = 250;
const API_URL = 'https://api.github.com/search/users?q=';
export default Ember.Component.extend({
searchUsers: task(function * (term) {
if (isBlank(term)) { return []; }
@PoslinskiNet
PoslinskiNet / components.navigation-bar.js
Created Sep 23, 2018
#30DaysOfEmber - Computed Properties Demo
View components.navigation-bar.js
// app/components/navigation-bar/component.js
import Component from '@ember/component';
import { computed } from '@ember/object';
export default Component.extend({
counter: 0,
clickCounterDecorated: computed('counter', function() {
return `Counter: ${this.counter}`;
}),
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
value: `<div>
<p><span style="font-weight: bold;">Type: </span> exploration, adventure</p>
<br>
<p><span style="font-weight: bold;">Audio: </span> English</p>
</div>`,
pellOptions: {
@PoslinskiNet
PoslinskiNet / Broccoli analyzer.MD
Last active Jun 29, 2018
Analyze your ember app vendor file
View Broccoli analyzer.MD
  • npm install -g broccoli-concat-analyser
  • CONCAT_STATS=true ember s -e production
  • kill the server
  • broccoli-concat-analyser ./concat-stats-for

IMAGE

View tasks.md

On the existing the application from the dev-path

  1. Make helper and use it in hbs that gets 2 attributes element and array of elements. It check that element is present in the array of elements and returns condition result as a boolean.
  2. Add-ons: Refactor one of controllers with ember-parachute
  3. Add-ons: Basic usage of ember-can
View components.my-button.js
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'button',
mouseLeave() {
alert('leave!');
},
mouseEnter() {
alert('enter!');
}
You can’t perform that action at this time.