Skip to content

Instantly share code, notes, and snippets.

import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
allProducts:
[ {"id": "5", "selected" : true },
{"id": "6", "selected" : false },
{"id": "7", "selected" : false },
{"id": "8", "selected" : false }
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
init(){
Ember.$.ajax({
url: "/ajax_json_echo/",
type: "GET",
dataType: "json",
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
ch: false,
outerdivclass : Ember.computed('ch', function(){
if(this.get('ch')){
return 'flip-container-half';
@ahmetemrekilinc
ahmetemrekilinc / controllers.application.js
Created October 9, 2017 12:25
power-select-max-select
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
init(){
this.set('bindingItem', this.get('selectedItem'));
},
matchingTenure : ["12", "24", "36", "48", "61"],
@ahmetemrekilinc
ahmetemrekilinc / controllers.application.js
Last active October 11, 2017 13:40
ember-service-unit-test
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
import Ember from 'ember';
export default Ember.Controller.extend({
buttonIsDisabled: Ember.computed('myEmail', function(){
return Ember.isBlank(this.get('myEmail'));
}),
actions: {
import Ember from 'ember';
export default Ember.Component.extend({
didInsertElement(){
this._super(...arguments);
this.$('').css('max-height', '100px');
this.$('').css('overflow-y', 'auto');
this.$('').on('scroll', function(){
console.log('my options scroll');
@ahmetemrekilinc
ahmetemrekilinc / controllers.application.js
Created November 11, 2017 18:07
power-select-selecteditem
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
dashboard : {selectors: [
{title: 'a', selectorOptions: ['a1', 'a2', 'a3']},
{title: 'b', selectorOptions: ['b1', 'b2', 'b3']},
{title: 'c', selectorOptions: ['c1', 'c2', 'c3']}
@ahmetemrekilinc
ahmetemrekilinc / controllers.application.js
Last active November 13, 2017 06:55
ember-drag-sort-parent
import Ember from 'ember';
import computed from 'ember-computed'
import {A} from 'ember-array/utils'
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
items1 : computed(() =>
A([
{id: 1, name : 'Parent1'},
@ahmetemrekilinc
ahmetemrekilinc / components.my-component.js
Last active April 1, 2019 18:47
ember-pikaday-test-null
import Ember from 'ember';
export default Ember.Component.extend({
actions: {
onSelection(val){
this.get('onSelection')(val);
}
}