This file contains hidden or 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
// Extend Ember.Route to add support for sensible | |
// document.title integration. | |
Ember.Route.reopen({ | |
// `titleToken` can either be a static string or a function | |
// that accepts a model object and returns a string (or array | |
// of strings if there are multiple tokens). | |
titleToken: null, |
-
Data Down / Actions Up
- http://emberjs.jsbin.com/nayaho/edit?html,js - Interdependent select boxes. No observers.
- http://ember-twiddle.com/2d7246875098d0dbb4a4 - One Way Input
-
Plain JSBin's
-
Ember Version Base JSBin's
This file contains hidden or 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 dbRef = new Firebase("https://YOUR-FIREBASE.firebaseio.com/"); | |
export default Ember.Controller.extend({ | |
/** | |
@property currentUser | |
@type {User} | |
@default null | |
*/ | |
currentUser: null, |
As I understand it, the original Custom Elements
concept had a crystalline form: attach a class to a tag-name.
Using the yet-to-be ES6 syntax, it would look something like this:
class MyElement extends HTMLElement {
constructor() {
}
doStuff() {
}
This file contains hidden or 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
(function(Ember) { | |
/** | |
Transforms a string so that it may be used as part of a 'pretty' / SEO friendly URL. | |
```javascript | |
'My favorite items.'.parameterize(); // 'my-favorite-items' | |
'action_name'.parameterize(); // 'action-name' | |
'100 ways Ember.js is better than Angular.'.parameterize(); // '100-ways-emberjs-is-better-than-angular' | |
``` |
**~~ NOTE: This is a Stage 0 proposal. ~~**
This proposal has been moved to https://github.com/jeffmo/es-class-properties.
Please direct all future feedback to that repo in the form of directed issues.
This file contains hidden or 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
# This won't be live if bars is a hasMany relationship | |
foo.get 'bars' | |
# Instead do this and use the patch below to get a live array: | |
hasManyHack foo, 'bars' | |
# workaround for https://github.com/emberjs/data/issues/1308 - | |
# once the SSOT branch is merged this should be able to be replaced |
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
TL;DR: lack of information about default values on non-route-driven controllers might force us to make href's overly verbose in some cases, or possible make us punt on non-route-driven-controller query params.
Scenario:
Router.map ->
this.route('about')
// application.hbs