@angular/flex-layout
Advanced tools
Changelog
5.0.0-beta.14 (2018-03-29)
fxFlex
no longer adds display: flex; flex-direction: row
by
defaultvalidateSuffixes
is no longer exported for public use. Please use the new BreakPoints API. If you must use validateSuffixes
, please use DEFAULT_BREAKPOINTS_PROVIDER_FACTORY
, which is a deprecated wrapper around validateSuffixes
(please note this has already been removed in the nightly builds, and will be removed completely in the next release)BEFORE:
import {validateSuffixes} from '@angular/flex-layout';
AFTER:
import {DEFAULT_BREAKPOINTS_PROVIDER_FACTORY} from '@angular/flex-layout';
The functions can be called in the exact same manner, as DEFAULT_BREAKPOINTS_PROVIDER_FACTORY
is simply a wrapper around validateSuffixes
. Please note that DEFAULT_BREAKPOINTS_PROVIDER_FACTORY
is deprecated in this release.
<a name="5.0.0-beta.13"></a>
Changelog
5.0.0-beta.13 (2018-02-22)
This @angular/flex-layout release provides full support for Angular 5.x
This release bumps the version for parity with Angular Material and latest builds of Angular.
Angular SSR support has been fixed and is now enabled properly. Developers should see Live Demo Docs for details on how to build and test [locally] the demo applications.
[fxLayoutWrap]
was deprecated in earlier betas. fxLayoutWrap has now been removed. Developers should use fxLayout
options.before
<div fxLayout="row" fxLayoutWrap="wrap"> ... </div>
current
<div fxLayout="row wrap"> ... </div>
To succeed in OSS, you have to get the community involved. Most of all, the developer community needs to contribute solutions, fixes, and enhancements to the project's growth.
Thank you to the contributors who helped with the v5.0.0-beta.13 release:
<table> <thead> <tr> <th align="center"><a href="https://github.com/CaerusKaru"> <img alt="Splaktar" src="https://avatars3.githubusercontent.com/u/416563?v=4&s=117" width="117" style="max-width:100%;"> </a> </th> </tr> </thead> <tbody> <tr> <td align="center" class="annotated"> <a href="https://github.com/CaerusKaru"> <span>CaerusKaru</span> </a> </td> </tbody> </table>Adam has worked tirelessly on the design and implementation of the Flex Layout SSR solution, an improved docs experience, bug fixes, and so much more. How does he find the time? We try not to ask...
<a name="2.0.0-beta.12"></a>
Changelog
2.0.0-beta.12 (2017-12-14)
The 2.0.0-beta.10 and beta.11 releases on npm accidentally glitched-out midway, so we resolved some release scripting issues and cut 2.0.0-beta.12 instead. oops :-)
Similar to those used in @angular/material, this release also upgrades the package dependencies to Angular ~5.1.0 and the RxJS 5.5.x.
Pipeable RxJS operators are now used instead of prototype-patching add operators.
<a name="2.0.0-beta.11"></a>
Changelog
2.0.0-beta.10 (2017-10-31)
[style.<alias>]
selectors are deprecated in favor of [ngStyle.<alias>]
selectors[class.<alias>]
selectors are deprecated in favor of [ngClass.<alias>]
selectors<div fxLayout
[class.xs]="['xs-1', 'xs-2']"
[style]="{'font-size': '10px', 'margin-left' : '13px'}"
[style.xs]="{'font-size': '16px'}"
[style.md]="{'font-size': '12px'}">
</div>
<div fxLayout
[ngClass.xs]="['xs-1', 'xs-2']"
[ngStyle]="{'font-size': '10px', 'margin-left' : '13px'}"
[ngStyle.xs]="{'font-size': '16px'}"
[ngStyle.md]="{'font-size': '12px'}">
</div>
ObservableMediaService
opaque token. Developers now simply use the ObservableMedia class to inject the service.before
constructor( @Inject(ObserverableMediaService) private media:any ) { ... }
after
constructor(private media:ObservableMedia) { ... }
ObservableMediateService
to inject instance of MediaService
MediaService::asObservable()
to get instance of observable// RxJS
import 'rxjs/add/operator/map';
@Component({ ... })
export class MyComponent {
constructor( @Inject(ObservableMediaService) media) {
media.asObservable()
.map( (change:MediaChange) => change.mqAlias == 'md' )
.subscribe((change:MediaChange) => {
let state = change ? `'${change.mqAlias}' = (${change.mediaQuery})` : ""
console.log( state );
});
}
}
<a name="2.0.0-beta.9"></a>
Changelog
2.0.0-beta.9 (2017-08-22)
This @angular/flex-layout release provides full support for Angular 4.x; along with a long list of improvements:
Note that Angular 2.x is no longer supported.
[style.<alias>]
selectors are deprecated in favor of [ngStyle.<alias>]
selectors[class.<alias>]
selectors are deprecated in favor of [ngClass.<alias>]
selectors<div fxLayout
[class.xs]="['xs-1', 'xs-2']"
[style]="{'font-size': '10px', 'margin-left' : '13px'}"
[style.xs]="{'font-size': '16px'}"
[style.md]="{'font-size': '12px'}">
</div>
<div fxLayout
[ngClass.xs]="['xs-1', 'xs-2']"
[ngStyle]="{'font-size': '10px', 'margin-left' : '13px'}"
[ngStyle.xs]="{'font-size': '16px'}"
[ngStyle.md]="{'font-size': '12px'}">
</div>
import {FlexLayoutModule} from '@angular/flex-layout';
@NgModule({
imports: [
BrowserModule,
FlexLayoutModule
]
})
export class DemoAppModule { }
ObservableMediaService
opaque token. Developers now simply use the ObservableMedia class to inject the service.MediaService::asObservable()
to get instance of observablebefore
constructor( @Inject(ObserverableMediaService) private media:any ) { ... }
after
constructor(private media:ObservableMedia) { ... }
import {ObservableMedia, MediaChange} from '@angular/flex-layout';
@Component({ ... })
export class MyComponent {
constructor( @Inject(ObservableMedia) media) {
media.asObservable()
.map( (change:MediaChange) => change.mqAlias == 'md' )
.subscribe((change:MediaChange) => {
let state = change ? `'${change.mqAlias}' = (${change.mediaQuery})` : ""
console.log( state );
});
}
}
<a name="2.0.0-beta.8"></a>
Changelog
2.0.0-beta.7 (2017-03-17)
Note: Previous Release
We prematurely labeled the previously release @angular/flex-layout v2.0.0-rc.1.
It should have been a beta release and is therefore renamed to @angular/flex-layout v2.0.0-beta.6.
FlexLayoutModule.forRoot()
was deprecated in beta.6 and is now removed.imports : [ FlexLayoutModule.forRoot() ]
imports : [ FlexLayoutModule ]
[style.<alias>]
selectors are deprecated in favor of [ngStyle.<alias>]
selectors[class.<alias>]
selectors are destructive replacements (no merging)[ngClass.<alias>]
selectors will merge (add or remove classnames)<div fxLayout
[class.xs]="['xs-1', 'xs-2']"
[style]="{'font-size': '10px', 'margin-left' : '13px'}"
[style.xs]="{'font-size': '16px'}"
[style.md]="{'font-size': '12px'}">
</div>
<div fxLayout
[ngClass.xs]="['xs-1', 'xs-2']"
[ngStyle]="{'font-size': '10px', 'margin-left' : '13px'}"
[ngStyle.xs]="{'font-size': '16px'}"
[ngStyle.md]="{'font-size': '12px'}">
</div>
<a name="2.0.0-beta.6"></a>