Famous / Famous/famous-angular

Model binding doesn't work in fa-surface.

Open
#336 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.9k
Forks
267
PR merge metrics
No merged PRs in 30d

Description

After I have changed a model from a view within 'fa-surface',
if I rechanged the model by controller's function, it doesn't reflect to the view.

---

The version.
- famous-angular: 0.5.0
- angular: 1.2.28

---
### Example HTML

```



button 1





button 2


```
### Example Javascript

``` javascript
.controller('mainCtrl', ['$scope', function($scope) {

$scope.one = 'initial one';
$scope.two = 'initial two';

$scope.clickone = function() {
$scope.one = 'clicked one';
};

$scope.clicktwo = function() {
$scope.two = 'clicked two';
};

}]);
```
### Example steps
1. initial view:
- 'initial one'
- 'initial two'
2. click button 1:
- 'clicked one' -- OK
- 'initial two'
3. edit first textarea:
- 'editted one' -- OK
- 'initial two'
4. click button 1 again:
- 'clicked one' -- OK
- 'initial two'
5. click button 2:
- 'clicked one'
- 'clicked two' -- OK
6. edit second textarea:
- 'clicked one'
- 'editted two' -- OK
7. click button 2 again:
- 'clicked one'
- 'editted two' -- **Wrong!**

---

Please confirm about the behavior above.
Thanks.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.