Skip to content

Commit

Permalink
feat(binding): automatic computed observation
Browse files Browse the repository at this point in the history
BOOM!!!
  • Loading branch information
EisenbergEffect committed May 26, 2018
1 parent 41eeba6 commit eff6fe2
Show file tree
Hide file tree
Showing 6 changed files with 371 additions and 23 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ An experimental re-working of Aurelia, oriented around compile-time reflection a
* [x] Text
* [x] Value Converters
* [x] Binding Behaviors
* [ ] Computed
* [x] Computed

### Custom Elements

Expand Down
176 changes: 166 additions & 10 deletions scripts/app-bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion scripts/app-bundle.js.map

Large diffs are not rendered by default.

12 changes: 10 additions & 2 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,16 @@ export class App {
todos: Todo[] = [];

get computedMessage() {
//console.log('Computed');
return this.message + ' Computed';
console.log('Computed Called');

let value = `
${this.message} Computed:
Todo Count ${this.todos.length}
Descriptions:
${this.todos.map(x => x.description).join('\n')}
`;

return value;
}

addTodo() {
Expand Down
Loading

0 comments on commit eff6fe2

Please sign in to comment.