Skip to content

Commit b8297e8

Browse files
committed
docs(guides): add guide for using compatibility mode
Fixes #4018
1 parent b5f15ad commit b8297e8

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

guides/compatibility-mode.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## What is compatibility mode?
2+
Compatibility mode for `@angular/material` allows the components to exist side-by-side with AngularJS Material components without any CSS collisions.
3+
4+
## What does compatibility mode do?
5+
When enabled, compatibility mode enforces that all template APIs use the prefix `mat-` instead of `md-`. This will prevent any CSS from AngularJS Material from affecting the components in `@angular/material`.
6+
7+
## How is compatibility mode enabled?
8+
Import `NoConflictStyleCompatibilityMode` into your application's root `NgModule`.
9+
10+
11+
## Example
12+
13+
```html
14+
<!-- Regular mode -->
15+
<button md-button mdTooltip="With a tooltip">Regular button</button>
16+
17+
<!-- In compatibility mode -->
18+
<button mat-button matTooltip="With a compatibility mode tooltip">Compatibility Mode button</button>
19+
```

0 commit comments

Comments
 (0)