Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings
This repository was archived by the owner on Jan 6, 2025. It is now read-only.
/flex-layoutPublic archive

Using Angular CLI

CaerusKaru edited this pageDec 26, 2018 ·10 revisions

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

Install the CLI

# Globalnpm uninstall -g @angular/clinpm 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 @angular/flex-layout @angular/cdk --save

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

npm install angular/flex-layout-builds angular/cdk-builds --save

This installs a nightly build which incorporates the latest updates not yet published to NPM

Import the Angular Flex-Layout NgModule

src/app/app.module.ts

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

Configuring SystemJS

If your project is using SystemJS for module loading, you will need to add@angular/flex-layoutto the SystemJS configuration:

System.config({// existing configuration optionsmap:{    ...,'@angular/flex-layout':'npm:@angular/flex-layout-builds/bundles/flex-layout.umd.js''@angular/cdk':'npm:@angular/cdk-builds/bundles/cdk.umd.js'}});

Sample Angular Flex-Layout projects

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

                   -   API Documentation   -   StackBlitz Template   -   Live Demos

Clone this wiki locally


[8]ページ先頭

©2009-2025 Movatter.jp