-
Notifications
You must be signed in to change notification settings - Fork 773
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
API Documentation for ngStyle and ngClass uses different syntax #215
Comments
I tripped up over this as well :) |
This has been fixed in the nightly builds: To use the most recent, pre-release builds, change this configuration in your Plunker: config.ts
test-app.ts Adjust the width to watch font size change:
instead of
<div class="containerX" [ngStyle.sm]="{'font-size': '20px'}">
<div [fxLayout]="direction" (click)="toggleDirection()" class="colored box" >
<div fxFlex="20"> fxFlex="20" </div>
<div fxFlex="60"> fxFlex="60" </div>
<div fxFlex > fxFlex </div>
</div>
</div> |
Also see PR #204 |
@molcik, @intellix - Please see #228 for more improvements regarding Responsive APIs for
Depends on PR #228 |
…rategy.OnPush strategies * fix(ngClass): properly differentiate between `ngClass` and `class` api usages * `class.<xxx>` are destructive overrides (as seen in `NgClass::klass`) * `ngClass.<xxx>` use iterables to merge/enable/disable 0...n classes * fix(ngClass,ngStyle): support ChangeDetectionStrategy.OnPush * Add support for both **OnPush** change detection strategies and for @input changes. > @see https://plnkr.co/edit/jCICQ1GXFnzFqFTFlXwh?p=preview fixes #206, fixes #215.
…rategy.OnPush strategies * fix(ngClass): properly differentiate between `ngClass` and `class` api usages * `class.<xxx>` are destructive overrides (as seen in `NgClass::klass`) * `ngClass.<xxx>` use iterables to merge/enable/disable 0...n classes * fix(ngClass,ngStyle): support ChangeDetectionStrategy.OnPush * Add support for both **OnPush** change detection strategies and for @input changes. > @see https://plnkr.co/edit/jCICQ1GXFnzFqFTFlXwh?p=preview fixes #206, fixes #215.
…rategy.OnPush strategies * fix(ngClass): properly differentiate between `ngClass` and `class` api usages * `class.<xxx>` are destructive overrides (as seen in `NgClass::klass`) * `ngClass.<xxx>` use iterables to merge/enable/disable 0...n classes * fix(ngClass,ngStyle): support ChangeDetectionStrategy.OnPush * Add support for both **OnPush** change detection strategies and for @input changes. * fix class lt-<xx> selectors > @see https://plnkr.co/edit/jCICQ1GXFnzFqFTFlXwh?p=preview fixes #206, fixes #215.
…rategy.OnPush strategies * fix(ngClass): properly differentiate between `ngClass` and `class` api usages * `class.<xxx>` are destructive overrides (as seen in `NgClass::klass`) * `ngClass.<xxx>` use iterables to merge/enable/disable 0...n classes * fix(ngClass,ngStyle): support ChangeDetectionStrategy.OnPush * Add support for both **OnPush** change detection strategies and for @input changes. * fix class lt-<xx> selectors > @see https://plnkr.co/edit/jCICQ1GXFnzFqFTFlXwh?p=preview fixes #206, fixes #215.
…rategy.OnPush strategies (#228) * fix(ngClass): properly differentiate between `ngClass` and `class` api usages * `class.<xxx>` are destructive overrides (as seen in `NgClass::klass`) * `ngClass.<xxx>` use iterables to merge/enable/disable 0...n classes * fix(ngClass,ngStyle): support ChangeDetectionStrategy.OnPush * Add support for both **OnPush** change detection strategies and for @input changes. * fix class lt-<xx> selectors > @see https://plnkr.co/edit/jCICQ1GXFnzFqFTFlXwh?p=preview fixes #206, fixes #215.
…rategy.OnPush strategies (angular#228) * fix(ngClass): properly differentiate between `ngClass` and `class` api usages * `class.<xxx>` are destructive overrides (as seen in `NgClass::klass`) * `ngClass.<xxx>` use iterables to merge/enable/disable 0...n classes * fix(ngClass,ngStyle): support ChangeDetectionStrategy.OnPush * Add support for both **OnPush** change detection strategies and for @input changes. * fix class lt-<xx> selectors > @see https://plnkr.co/edit/jCICQ1GXFnzFqFTFlXwh?p=preview fixes angular#206, fixes angular#215.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug
In API documentation is written to use
ngClass
andngStyle
but it doesn't work. To use responsive features you have to useclass
andstyle
Example
To change font-size you have to use:
[style.sm]="{'font-size.px': 40}"
instead of:
[ngStyle.sm]="{'font-size.px': 40}"
https://plnkr.co/edit/b7XxsdgBAISf0KzRDwte?p=preview
Version
@angular/flex-layout: ^2.0.0-rc.1
The text was updated successfully, but these errors were encountered: