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

ngMessageDefault - Add support for showing values not mapped with ng-message #12008

Closed
douglascvas opened this issue Jun 2, 2015 · 6 comments · Fixed by #16587
Closed

ngMessageDefault - Add support for showing values not mapped with ng-message #12008

douglascvas opened this issue Jun 2, 2015 · 6 comments · Fixed by #16587

Comments

@douglascvas
Copy link

Many times it is necessary that we show a generic error message for unexpected values.
Would be nice to have something like:

<div ng-messages="controller.errors">
    <div ng-message="error1">Option 1</div>
    <div ng-message="error2">Option 2</div>
    <div ng-message-default>Option 3</div>
</div>

This way, whenever there is an "error3" in "controller.errors", as it is not mapped, the value under the ng-message-default would be shown.

@douglascvas douglascvas changed the title ngMessageDefault ngMessageDefault - Add support for showing values not mapped with ng-message Jun 2, 2015
@Narretz Narretz added this to the Backlog milestone Jun 3, 2015
gdangelo added a commit to gdangelo/angular.js that referenced this issue Jun 25, 2015
Added support for showing default message when no values are mapped with ng-message.

Closes angular#12008
gdangelo added a commit to gdangelo/angular.js that referenced this issue Jul 5, 2015
Added a new param (boolean, isDefault) to the factory ngMessageDirectiveFactory, in order to reuse code in ngMessageDefault directive.

Closes angular#12008
@douglascvas
Copy link
Author

Sorry to push it, but could someone tell me what is the status? Will it not be included in the release?

@petebacondarwin petebacondarwin modified the milestones: 1.5.x - migration-facilitation, Backlog Nov 1, 2015
@petebacondarwin petebacondarwin modified the milestones: 1.6.x, 1.5.x - migration-facilitation Nov 23, 2015
@petebacondarwin
Copy link
Contributor

This will go into 1.6 as soon as 1.5.0 is out; since we have locked down 1.5 features now in preparation for a release very soon.

@Narretz Narretz modified the milestones: 1.6.4, 1.6.x Mar 8, 2017
@gilad905
Copy link

+1

@petebacondarwin
Copy link
Contributor

Marked with "PRs plz" which indicates we would accept a community contribution for this issue.

@4O4
Copy link

4O4 commented Aug 14, 2017

I'm planning to work on this. I'll probably start with the code from #12213 and make changes requested in the comments.

@Narretz
Copy link
Contributor

Narretz commented Aug 15, 2017

@4O4 That's great to hear!

@Narretz Narretz modified the milestones: 1.6.x, 1.7.x Apr 12, 2018
@Narretz Narretz self-assigned this May 3, 2018
Narretz pushed a commit to Narretz/angular.js that referenced this issue Jun 1, 2018
Added support for showing default message when no values are mapped with ng-message.

Closes angular#12008
Narretz pushed a commit to Narretz/angular.js that referenced this issue Jun 1, 2018
Added support for showing default message when no values are mapped with ng-message.

Closes angular#12008
Narretz pushed a commit to Narretz/angular.js that referenced this issue Jun 1, 2018
Added support for showing default message when no values are mapped
with ng-message.

Closes angular#12008
Narretz added a commit that referenced this issue Jun 6, 2018
add support for showing default message when a truthy value is not matched by an ng-message directive.

Closes #12008
Closes #12213
Closes #16587
Narretz added a commit that referenced this issue Jun 6, 2018
add support for showing default message when a truthy value is not matched by an ng-message directive.

Closes #12008
Closes #12213
Closes #16587
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.