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

cdk should warn of missing doctype #8084

Open
isaacplmann opened this issue Oct 27, 2017 · 1 comment
Open

cdk should warn of missing doctype #8084

isaacplmann opened this issue Oct 27, 2017 · 1 comment
Labels
area: cdk/platform P4 A relatively minor issue that is not relevant to core functions

Comments

@isaacplmann
Copy link

Bug, feature request, or proposal:

Currently @angular/material warns if you don't add a doctype to your index.html, but the @angular/cdk does not. That warning should be moved from lib/common to the cdk.

What is the expected behavior?

Using the cdk OverlayModule warns you if you don't correctly set a doctype.

What is the current behavior?

No warning. There is only a warning if you import some module from @angular/material.

What are the steps to reproduce?

http://plnkr.co/edit/xX4SltIH9IbQHEHVvNyx?p=preview
This plunker does not import any material modules, but it does import OverlayModule from @angular/cdk. There should be a warning in the console. If you import any modules from @angular/material into the AppModule, there will be a warning about a missing doctype.

What is the use-case or motivation for changing an existing behavior?

I have a library that uses the cdk, but the overlay doesn't work correctly if there isn't a doctype specified. I want my users to be warned explicitly if they don't have that set.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

@angular/cdk@2.0.0-beta.12, angular 4.4.6

Is there anything else we should know?

@isaacplmann
Copy link
Author

This issue was originally discussed in (the now closed) PR #8037 .

@jelbourn jelbourn added the P4 A relatively minor issue that is not relevant to core functions label Oct 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: cdk/platform P4 A relatively minor issue that is not relevant to core functions
Projects
None yet
Development

No branches or pull requests

3 participants