View cors-proxy.js
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
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
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', | |
init(){ | |
var model = Ember.Object.create({ | |
title:"My Cool Model", | |
items:[ | |
{name:"item1",isSelected:true}, | |
{name:"item2",isSelected:false} | |
] |
View controllers.application.js
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', | |
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(){ |
View using-npm-package-in-ember-1.js
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
npm install --save xml2js | |
import xml2js from 'xml2js' |
View RoomList.html
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
<template name="RoomListTemplate"> | |
<div id="roomList"> | |
<ul> | |
{{#each rooms}} | |
<li>{{name}}</li> | |
{{/each}} | |
</ul> | |
</div> | |
</template> |