This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Controller from '@ember/controller'; | |
import { tracked } from '@glimmer/tracking'; | |
import { action, computed } from '@ember/object'; | |
class Item { | |
@tracked name; | |
constructor(name) { | |
this.name = name; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Component from '@glimmer/component'; | |
import { tracked } from '@glimmer/tracking'; | |
import { action } from '@ember/object'; | |
export default class extends Component { | |
@tracked value = 'test'; | |
@tracked counter = 0; | |
@action submit(e) { | |
if (e.key === 'Enter') { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
@keyframes move { | |
0% { | |
transform: translateX(0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async beforeModel() { | |
const curUser = this.get('currentUser.user'); | |
const curCompany = curUser.get('currentCompany'); | |
const { current_conversation_id } = this.paramsFor('messages.index'); | |
const queryParams = { | |
currentConversationId: current_conversation_id, | |
companyId: curCompany.get('id') | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async beforeModel() { | |
const curUser = this.get('currentUser.user'); | |
const curCompany = curUser.get('currentCompany'); | |
const { current_conversation_id } = this.paramsFor('messages.index'); | |
const queryParams = { | |
currentConversationId: current_conversation_id, | |
companyId: curCompany.get('id') | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
let originalErrorHandler: (error: Error) => void | null | undefined; | |
// ToDo: fix error typing | |
// eslint-disable-next-line @typescript-eslint/no-explicit-any | |
function throwUnlessMatches(error: any, code?: string | number): void { | |
// eslint-disable-next-line eqeqeq | |
if (code && error.errors && error.errors[0] && error.errors[0].status != code) { | |
throw error; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Controller from '@ember/controller'; | |
import { tracked } from '@glimmer/tracking'; | |
import { action } from '@ember/object'; | |
export default class ApplicationController extends Controller { | |
@tracked | |
appName = 'Ember Twiddle'; | |
@action | |
update (event) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
import { assert } from '@ember/debug'; | |
let pending = 0; | |
export function checkPending(): boolean { | |
return pending === 0; | |
} | |
export default function waitForInTests(_target: unknown, _propertyKey: string, desc: PropertyDescriptor): void { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
isChecked: false, | |
actions: { | |
toggle() { | |
this.toggleProperty('isChecked'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
timeZoneOptions: Object.freeze([ | |
{ groupName: "Asia", options:["Kabul","Yerevan","Baku","Dhaka","Brunei","Bangkok","Shanghai","Urumqi","Taipei","Macau","Tbilisi","Dili","Kolkata","Jakarta"]}, | |
{ groupName: "Australia", options: ["Darwin", "Eucla", "Perth", "Brisbane","Lindeman","Adelaide","Hobbart","Currie","Melbourne"]}, | |
]), | |