Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Material labels do not show an asterisk when required as the bootstrap elements do #604

Closed
dwaldrum opened this issue Dec 19, 2017 · 3 comments · Fixed by #609
Closed

Material labels do not show an asterisk when required as the bootstrap elements do #604

dwaldrum opened this issue Dec 19, 2017 · 3 comments · Fixed by #609

Comments

@dwaldrum
Copy link
Contributor

dwaldrum commented Dec 19, 2017

I'm submitting a ... (check one with "x")

[X] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request

Current behavior
When using the material design, form elements that are required do not have an asterisk.

Expected behavior
Elements that are required should show an asterisk as they do with the bootstrap module.

Minimal reproduction of the problem with instructions
https://angular-dece1p.stackblitz.io

What is the motivation / use case for changing the behavior?
Fixing

Please tell us about your environment:
Windows 10
WLS Ubuntu
Visual Studio Code

  • Angular version: 5.0.0

  • Ngx-formly version: 2.0.0-rc.3

  • Browser:
    All

  • Language:
    All

@aitboudad
Copy link
Member

let me know if you want to work on this, change should be made at: form-field
similar to bootstrap label

@davewaldrum
Copy link

davewaldrum commented Dec 20, 2017

I've already fixed it and I want to put a PR up for it, but I'm running into an issue trying to test formly as I work on it with material.

First off, I can't npm link the library to an angular project to test it as I work.

Second, I wanted to update the documentation (examples) to add material ui examples. If you take any of the examples, and swap out the bootstrap module for the material one, you get an error:

'mat-label' is not a known element:

I've tried including the material modules that are required in the example's module file, but nothing seems to work. I'm still not 100% up to speed with Angular's new module system so maybe you could shed some light on this.

Once I can figure these issues out, I can help add material examples to the documentation and it would make working on any features in regards to material easier.

@aitboudad
Copy link
Member

First off, I can't npm link the library to an angular project to test it as I work.

you should go into dist folder and link the package you wish to include.

Second, I wanted to update the documentation (examples) to add material ui examples. If you take any of the examples, and swap out the bootstrap module for the material one, you get an error: 'mat-label' is not a known element:

yep it's a known issue, that's why I didn't include it in doc example, material require angular 5.0, if you want to check it just update all @angular package into v5 and it should work!

dwaldrum pushed a commit to dwaldrum/ngx-formly that referenced this issue Dec 23, 2017
When a field is required, add an asterisk to the label like the bootstrap ui does

fix ngx-formly#604
aitboudad pushed a commit that referenced this issue Dec 26, 2017
When a field is required, add an asterisk to the label like the bootstrap ui does

fix #604
aitboudad pushed a commit that referenced this issue Dec 26, 2017
…n required. (#609)

When a field is required, add an asterisk to the label like the bootstrap ui does

fix #604

Triggered by commit: 71202af
Travis build: https://travis-ci.org/formly-js/ngx-formly/builds/321827884
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants