Skip to content

Using Angular CLI

Alessio Bianchini edited this page Dec 17, 2025 · 5 revisions

Using Flex-Layout with the the Angular CLI is easy.

Install the CLI

# Global
npm uninstall -g @angular/cli
npm install -g @angular/cli

Create a new project

 ng new my-project

Or, use with existing project

rm -rf node_modules/
npm install

The new command creates a project with a build system for your Angular app.

Install Flex-Layout

npm install ng-flex-layout @angular/cdk --save

This installs the most recent npm release of Flex-Layout.

Import the Angular Flex-Layout NgModule

src/app/app.module.ts

import {NgModule} from '@angular/core';
import {FlexLayoutModule} from 'ng-flex-layout';
// other imports 
@NgModule({
  imports: [FlexLayoutModule],
  ...
})
export class PizzaPartyAppModule {}

Sample Angular Flex-Layout projects

Developers are encouraged to review the live demos and source for the Flex-Layout Demos:

Clone this wiki locally