From d2bcbf94e222dc7ccd3885171208dbdcef665b6b Mon Sep 17 00:00:00 2001 From: Foxandxss Date: Fri, 18 Sep 2015 20:34:59 +0200 Subject: [PATCH] Change vm for something else --- README.md | 10 +++++----- examples/counter/components/counter.html | 10 +++++----- examples/counter/components/counter.js | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index fba2416..f35294a 100644 --- a/README.md +++ b/README.md @@ -66,11 +66,11 @@ class CounterController { ```HTML
-

Clicked: {{vm.counter}} times

- - - - +

Clicked: {{counter.value}} times

+ + + +
``` diff --git a/examples/counter/components/counter.html b/examples/counter/components/counter.html index 7912361..416e431 100644 --- a/examples/counter/components/counter.html +++ b/examples/counter/components/counter.html @@ -1,8 +1,8 @@
-

Clicked: {{vm.counter}} times

+

Clicked: {{counter.value}} times

- - - - + + + +
diff --git a/examples/counter/components/counter.js b/examples/counter/components/counter.js index f6d69c2..c574ea9 100644 --- a/examples/counter/components/counter.js +++ b/examples/counter/components/counter.js @@ -3,7 +3,7 @@ import * as CounterActions from '../actions/counter'; export default function counter() { return { restrict: 'E', - controllerAs: 'vm', + controllerAs: 'counter', controller: CounterController, template: require('./counter.html'), scope: {} @@ -20,7 +20,7 @@ class CounterController { // Which part of the Redux global state does our component want to receive on $scope? mapStateToScope(state) { return { - counter: state.counter + value: state.counter }; } } \ No newline at end of file