ng-if on a portal widget
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2019 10:37 AM
On a portal widget we have a 'work email address' field and an 'alternate email address' field. What I am trying to do is if 'work email address' field is blank then 'alternate email address' should be mandatory. How do I do this?
6 REPLIES 6
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2019 01:13 PM
I would try to figure out exactly which piece isn't working. Is your condition evaluating correctly, and is the ngRequired working how you think it should if you hardcode a true or false value?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2019 01:17 PM
Try
ng-required="c.registration_work_email.toString().length == 0"