Skip to content

Instantly share code, notes, and snippets.

import Controller from '@ember/controller';
export default class ApplicationController extends Controller {
appName = 'Ember Truncate Text';
}
import Controller from '@ember/controller';
export default class ApplicationController extends Controller {
}
import Controller from '@ember/controller';
import { tracked } from "@glimmer/tracking";
import { action } from "@ember/object";
export default class ApplicationController extends Controller {
@tracked isOpen = false;
openedAt;
shouldPreventClick = false;
shouldPreventClose = false;
didOpenOnMouseEnter = false;
import Component from '@glimmer/component';
import { capitalize } from '@ember/string';
export default class extends Component {
get cardAttributes() {
let attributes = {
'title': this.args.card.attributes.title,
'list-key-value': this.listKeyValue,
};
let arr = [
{
title: 'Cat',
tags: ['tag1', 'tag2'],
},
{
title: 'Dog',
tags: ['tag1', 'tag2'],
},
{
@camskene
camskene / controllers.application.js
Last active June 21, 2019 15:40
Ember Tooltip with `in-element`
import Ember from 'ember';
export default Ember.Controller.extend({
data: ['a', 'b', 'c', 'd', 'e'],
});
@camskene
camskene / controllers.application.js
Last active June 21, 2019 03:01
Ember Tooltip Service
import Ember from 'ember';
export default Ember.Controller.extend({
data: ['a', 'b', 'c', 'd', 'e'],
});
@camskene
camskene / index.html
Created April 8, 2019 01:06
JS Bin Generate `rule` with versions. Generate `ruleGroup` // source https://jsbin.com/kemexeh
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Generate `rule` with versions. Generate `ruleGroup`">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
import Ember from 'ember';
export default Ember.Controller.extend({
data: [
{
id: 1,
name: 'item 1',
},
{
id: 2,
@camskene
camskene / controllers.application.js
Last active June 11, 2019 21:42
Composing Patterns
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
buttons: [
{
label: 'click',
icon: 'åß',
},