This package has been deprecated

Author message:

ngx-material-pages has been renamed to @angular-material-extensions/pages. Please update your dependencies

ngx-material-pages
TypeScript icon, indicating that this package has built-in type declarations

1.3.2 • Public • Published

ngx-material-pages - Open source library for Angular Apps to illustrate custom material pages content with steps (ideal for tutorials and explanation purposes) - Angular v6 supported

npm version, npm Join the chat at https://gitter.im/angular-material-extensions/Lobby CircleCI branch Coverage Status dependency Status devDependency Status Greenkeeper Badge license

This project has been moved to @angular-material-extensions/pages

ngx-material-pages

Do you need an illustration for your explanations and tutorials ? Or maybe an alternative way of pagination ? Are you using angular to build wonderful pwa ? You favorite front-end framework is angular material ?

ngx-material-pages is the right UI component for you! You build wonderful and comprehensive tutorials pages by providing an outlook and content for each step of your explanation.

Try it out!

Demo

View all the directives in action at https://anthonynahas.github.io/ngx-material-pages

Dependencies

  • Angular (requires Angular 2 or higher)
  • if you are still using angular v5, please the following version 1.2.1

Peer Dependencies Requirements:

Requirements:

This project has been renamed from ngx-material-pages to @angular-material-extensions/pages

Install Peer Dependencies - help

npm i -s @angular/animations @angular/material @angular/cdk

Installation

Install above dependencies via npm.

Now install ngx-material-pages via:

npm install --save ngx-material-pages

SystemJS

Note:If you are using SystemJS, you should adjust your configuration to point to the UMD bundle. In your systemjs config file, map needs to tell the System loader where to look for ngx-material-pages:

map: {
  'ngx-material-pages': 'node_modules/ngx-material-pages/bundles/ngx-material-pages.umd.js',
}

Once installed you need to import the main module:

import { NgxMaterialPagesModule } from 'ngx-material-pages';

The only remaining part is to list the imported module in your application module. The exact method will be slightly different for the root (top-level) module for which you should end up with the code similar to (notice NgxMaterialPagesModule .forRoot()):

NB: please do not forget to import the angular animations module in your root component too! (usally app.component.ts)

import { NgxMaterialPagesModule } from 'ngx-material-pages';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
 
@NgModule({
  declarations: [AppComponent, ...],
  imports: [NgxMaterialPagesModule.forRoot(),
  BrowserAnimationsModule,
   ...],  
  bootstrap: [AppComponent]
})
export class AppModule {
}

Other modules in your application can simply import NgxMaterialPagesModule:

import { NgxMaterialPagesModule } from 'ngx-material-pages';
 
@NgModule({
  declarations: [OtherComponent, ...],
  imports: [NgxMaterialPagesModule, ...], 
})
export class OtherModule {
}

Add a material theme - help

The easiest way is to add

@import '~@angular/material/prebuilt-themes/deeppurple-amber.css';

to you styles.css files

learn more

Add a material icons - help

The easiest way is to add

<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

to you index.html files

learn more

Usage - Library's components

This library consists of 4 essential components.

  1. ngx-material-pages the main container that hold the pages incl. the outlook view and the content

  2. ngx-material-page-loader the container of each page. This component should have two nested elements which are the outlook and the content components (see below)

  3. ngx-material-page-outlook the outlook view of a page. This can contain a custom component, custom layout or just a title.

  4. ngx-material-page-content this is the content view of the page. This can be anything!!

  5. Example:

<ngx-material-pages>
    <ngx-material-page-loader>
      <ngx-material-page-outlook>
        <!-- put your own outlook view for the first page -->
      </ngx-material-page-outlook>
      <ngx-material-page-content>
        <!-- put your own content view for the first page -->
      </ngx-material-page-content>
    </ngx-material-page-loader>
    <ngx-material-page-loader>
      <ngx-material-page-outlook>
        <!-- put your own outlook view for the second page -->
      </ngx-material-page-outlook>
      <ngx-material-page-content>
        <!-- put your own content view for the second page -->
      </ngx-material-page-content>
    </ngx-material-page-loader>
  </ngx-material-pages>

Where are ngx-material-pages being used ? Here are some examples

Other Angular Libraries

Support

License

Copyright (c) 2018 Anthony Nahas. Licensed under the MIT License (MIT)

Package Sidebar

Install

npm i ngx-material-pages

Weekly Downloads

0

Version

1.3.2

License

MIT

Unpacked Size

125 kB

Total Files

20

Last publish

Collaborators

  • anthonynahas