Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Support one-time binding in ng-pluralize #10004

Closed
blaise-io opened this issue Nov 11, 2014 · 2 comments
Closed

Support one-time binding in ng-pluralize #10004

blaise-io opened this issue Nov 11, 2014 · 2 comments

Comments

@blaise-io
Copy link
Contributor

I would expect this to work, but it doesn't:

<ng-pluralize count="::foo" when="{'0': 'zero', '1': 'one', 'other': 'many'}"></ng-pluralize>.

Example: http://plnkr.co/edit/iaFI3p?p=preview

Any plans to make this work?

@caitp
Copy link
Contributor

caitp commented Nov 11, 2014

I don't see why we couldn't make that work, I'll look at this next week, or this week if I have time.

@gkalpak
Copy link
Member

gkalpak commented Nov 12, 2014

@caitp: #10022 is my take on it.
I feel like there should be an easy way to find out whether an expression is a bindOnce or not. E.g. $parse could set a flag similar to literal/constant.
Right now, I checked that the epression starts with ::, but it doesn't feel DRY or right. Have I overlooked something ?

gkalpak added a commit to gkalpak/angular.js that referenced this issue Nov 12, 2014
gkalpak added a commit to gkalpak/angular.js that referenced this issue Nov 13, 2014
gkalpak added a commit to gkalpak/angular.js that referenced this issue Nov 13, 2014
gkalpak added a commit to gkalpak/angular.js that referenced this issue Nov 14, 2014
gkalpak added a commit to gkalpak/angular.js that referenced this issue Nov 14, 2014
gkalpak added a commit to gkalpak/angular.js that referenced this issue Nov 14, 2014
gkalpak added a commit to gkalpak/angular.js that referenced this issue Nov 18, 2014
gkalpak added a commit to gkalpak/angular.js that referenced this issue Nov 18, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.