Skip to content

Commit

Permalink
Repro issue with each-in
Browse files Browse the repository at this point in the history
  • Loading branch information
asakusuma committed Apr 16, 2019
1 parent 69378c7 commit bd2dab3
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 4 deletions.
22 changes: 22 additions & 0 deletions app/routes/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import Route from '@ember/routing/route';

export default Route.extend({
model() {
const getter = Object.create(Object.prototype, {
foo: {
get: function () {
return 'bar';
}
}
});
const dotNotation = {};
dotNotation['fo.o'] = 'bar';
const pojo = { foo: 'bar' };
return {
pojo,
dotNotation,
getter
};
}
});

4 changes: 0 additions & 4 deletions app/templates/application.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
{{!-- The following component displays Ember's default welcome message. --}}
<WelcomePage />
{{!-- Feel free to remove this! --}}

{{outlet}}
20 changes: 20 additions & 0 deletions app/templates/index.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<h3>POJO</h3>
<ol>
{{#each-in model.pojo as |key value|}}
<li>{{key}} {{value}}</li>
{{/each-in}}
</ol>

<h3>Dot notation key</h3>
<ol>
{{#each-in model.dotNotation as |key value|}}
<li>{{key}} {{value}}</li>
{{/each-in}}
</ol>

<h3>Getter</h3>
<ol>
{{#each-in model.getter as |key value|}}
<li>{{key}} {{value}}</li>
{{/each-in}}
</ol>

0 comments on commit bd2dab3

Please sign in to comment.