Skip to content

Instantly share code, notes, and snippets.

View cors-proxy.js
var hoxy = require('hoxy');
var port = 8000;
var proxy = hoxy.createServer().listen(port, function() {
console.log('The proxy is listening on port ' + port + '.');
});
proxy.intercept('response', function(req, resp, cycle) {
if(req.method=="OPTIONS"){
resp.statusCode=200;
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
init(){
var model = Ember.Object.create({
title:"My Cool Model",
items:[
{name:"item1",isSelected:true},
{name:"item2",isSelected:false}
]
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
filtersService:Ember.inject.service('filters'),
clientState:Ember.computed.alias('filtersService.filters.clientState'),
queryStrings:Ember.computed('filtersService.queryStrings',function(){
return JSON.stringify(this.get('filtersService.queryStrings'));
}),
queryStringsObserver:Ember.observer('filtersService.queryStrings',function(){
@Mas-Tool
Mas-Tool / RoomList.html
Created Jun 2, 2012
MasTool help please.
View RoomList.html
<template name="RoomListTemplate">
<div id="roomList">
<ul>
{{#each rooms}}
<li>{{name}}</li>
{{/each}}
</ul>
</div>
</template>