You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 29, 2019. It is now read-only.
I've got a max value set on 'progress' element (with many 'bar' elements beneath it) and the value is never making it's way into the actual controller for the entire progress bar. This means that the max will always be the default value of 100 for a 'progress' element and incorrectly calculate the width.
I believe this is due to a recent change in ProgressController where it is attempting to default $scope.max if not set by doing $scope.max = $scope.max || default. In the previous version of the code it would look in $attrs for max instead ($scope.max = $attrs.max || default). The reason the new version does not work is because for the 'progress' directive (but not the ProgressBar directive), there is no 'max' variable defined in the scope, thus $scope.max will never be set for this directive. It used to work before because it was looking in $attrs.
Example: http://plnkr.co/edit/K2Y3G39IvP8VJbgwl06D?p=preview
If you inspect the progress bar, you can see that it's taking up 100% width even though it's value is set to 186 out of 211 (211 being the maximum set). There is also another bar beneath it that is invisible with the value of 25.
I believe to fix this while maintaining the current implementation, 'max: "=?"' should be added to the scope object of the 'progress' directive. Although I don't know the full ramifications of this and there certainly are other ways (such as reverting to $attrs again).
EDIT: trying to fix some terrible english.
The text was updated successfully, but these errors were encountered:
I've got a max value set on 'progress' element (with many 'bar' elements beneath it) and the value is never making it's way into the actual controller for the entire progress bar. This means that the max will always be the default value of 100 for a 'progress' element and incorrectly calculate the width.
I believe this is due to a recent change in ProgressController where it is attempting to default $scope.max if not set by doing $scope.max = $scope.max || default. In the previous version of the code it would look in $attrs for max instead ($scope.max = $attrs.max || default). The reason the new version does not work is because for the 'progress' directive (but not the ProgressBar directive), there is no 'max' variable defined in the scope, thus $scope.max will never be set for this directive. It used to work before because it was looking in $attrs.
Example: http://plnkr.co/edit/K2Y3G39IvP8VJbgwl06D?p=preview
If you inspect the progress bar, you can see that it's taking up 100% width even though it's value is set to 186 out of 211 (211 being the maximum set). There is also another bar beneath it that is invisible with the value of 25.
I believe to fix this while maintaining the current implementation, 'max: "=?"' should be added to the scope object of the 'progress' directive. Although I don't know the full ramifications of this and there certainly are other ways (such as reverting to $attrs again).
EDIT: trying to fix some terrible english.
The text was updated successfully, but these errors were encountered: