Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Only change dom attribue,the boolean attribute can't work well #1627

Open
LinboLen opened this issue Dec 17, 2014 · 2 comments
Open

Only change dom attribue,the boolean attribute can't work well #1627

LinboLen opened this issue Dec 17, 2014 · 2 comments

Comments

@LinboLen
Copy link

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body ng-app mulit-select>
<h3>hello {{whole_selected}}</h3>
<input type="checkbox" ng-model="whole_selected" /><label>SelectALL</label>

<input type="checkbox" ng-checked="whole_selected" />
<input type="checkbox" ng-checked="whole_selected" />
<input type="checkbox" ng-checked="whole_selected" />
<input type="checkbox" ng-checked="whole_selected" />

<script type="application/dart" src="mulit_select.dart"></script>
<!-- jquery is used to test-->
<script type="application/javascript" src="http://code.jquery.com/jquery-1.11.1.js"></script>
<!--<script src="packages/browser/dart.js"></script>-->
</body>
</html>
import 'package:angular/angular.dart';
import 'package:angular/application_factory.dart';

@Injectable()
class MulitSelect {
  String whole_selected;
}

main(){
  applicationFactory()
  .rootContextType(MulitSelect)
  .run();
}
navigator.userAgent =
"Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 (Dart) Safari/537.36"

Problem

It does not work after I changed the sub input
AngularDart change the Element Attribute work well,but the InputElement 's checked prototype not changed

Jquery can fix it

jquery has a method prop, $('input').prop('checked',true);

Angular.dart fix it by a ugly way

https://github.com/xsilen/angular.dart/compare/angular:master...patch-1?quick_pull=1

@naomiblack
Copy link
Contributor

Could you submit your proposed fix as a PR please?

@LinboLen
Copy link
Author

image Sure? I am afraid to pull request. I try to do it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants