Skip to content

Instantly share code, notes, and snippets.

import Component from '@ember/component';
import layout from '../templates/components/svg-icon';
import { get, set } from '@ember/object';
export default Component.extend({
layout,
svgicons : '',
tagName: 'svg', // No I18N
import Component from '@ember/component';
import layout from '../templates/components/virtual-list-handler';
import object, { get, set, setProperties } from '@ember/object';
export default Component.extend({
layout,
wrapperElement: null,
@mohamedali-s-4725
mohamedali-s-4725 / components.virtual-element\.js
Last active February 14, 2022 07:51
Virtual DOM - Handled wih Page Size
import Component from '@ember/component';
import layout from '../templates/components/virtual-element';
import { set } from '@ember/object'; // No I18N
export default Component.extend({
layout,
tagName: 'li',
import Controller from '@ember/controller';
import $ from 'jquery';
import { A } from '@ember/array';
import object, { action, set } from '@ember/object';
export default Controller.extend({
totalCount: 1000,
@mohamedali-s-4725
mohamedali-s-4725 / controllers.application\.js
Last active February 1, 2022 13:36
Virtual DOM computing by Page Size
import Controller from '@ember/controller';
import $ from 'jquery';
import { A } from '@ember/array';
import object, { action, set } from '@ember/object';
export default Controller.extend({
totalCount: 1000,
@mohamedali-s-4725
mohamedali-s-4725 / controllers.application\.js
Created February 1, 2022 10:58
Iterate 1000+ items in each
import Controller from '@ember/controller';
import $ from 'jquery';
import { A } from '@ember/array';
import { set } from '@ember/object';
export default Controller.extend({
count: A(),
@mohamedali-s-4725
mohamedali-s-4725 / controllers.application\.js
Created February 1, 2022 10:48
Virtual DOM by toggle 30 items
import Controller from '@ember/controller';
import $ from 'jquery';
import { A } from '@ember/array';
import object, { action, set } from '@ember/object';
export default Controller.extend({
count: A(),
import Controller from '@ember/controller';
export default class ApplicationController extends Controller {
appName = 'Ember Twiddle';
}
import Component from '@ember/component';
import layout from '../templates/components/my-component';
export default Component.extend({
layout,
options: {
option1: 'value1',
import Component from '@ember/component';
export default Component.extend({
});