Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

fxLayout API

CaerusKaru edited this page Mar 17, 2019 · 12 revisions

The fxLayout directive should be used on DOM containers whose children should layout or flow as the text direction along the main-axis or the cross-axis.

<div fxLayout="row">
  <div>1. One</div> <div>2. Two</div> <div>3. Three</div> <div>4. Four</div>
</div>

or

<div fxLayout="column">
  <div>1. One</div>
  <div>2. Two</div>
  <div>3. Three</div>
  <div>4. Four</div>
</div>

fxlayout

fxLayout Options

Shown below are the supported fxLayout directive values and their resulting CSS stylings on the hosting element container:

Value Equivalent CSS
'' (default) flex-direction: row
row flex-direction: row
row-reverse flex-direction: row-reverse
column flex-direction: column
column-reverse flex-direction: column-reverse

fxLayout + wrap

By default, flex items will not wrap in their container. Formerly published as distinct directive, fxLayoutWrap was deprecated in favor of simply adding the wrap parameter as a secondary option to the fxLayout directive.

<div fxLayout="row wrap">
  <div>1. One</div> <div>2. Two</div> <div>3. Three</div> <div>4. Four</div>
</div>

Note: when using wrap, developers must first specify the layout direction.

fxLayout + inline

There are some instances where developers want to use the inline-flex CSS display property, instead of the default. Angular Layout provides this option by accepting a secondary argument to the fxLayout directive as follows:

<div fxLayout="row inline">
  <div>1. One</div> <div>2. Two</div> <div>3. Three</div> <div>4. Four</div>
</div>

Note: when using inline, developers must first specify the layout direction.

fxLayout Side-Effects

Changes to the fxLayout value will cause the following directives to update and modify their element stylings:

  • fxLayoutGap
  • fxFlex
  • fxLayoutAlign

Clone this wiki locally

Morty Proxy This is a proxified and sanitized view of the page, visit original site.