npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

angular2-mdl

v2.13.2

Published

Angular 2 components, directives and styles based on material design lite https://getmdl.io.

Downloads

1,126

Readme

Angular 2 components, directives and styles based on material design lite https://getmdl.io (v: 1.3.0).

This package assumes that you are building an Angular2 app with TypeScript. Angular CLI makes it even easier but isn't required.

Demo-App with all supported components and documentation

Build Status CircleCI npm version Downloads Coverage Status Dependencies peerDependencies Status DevDependencies Code Climate

Please don't use github to ask questions. Use stackoverflow instead: http://stackoverflow.com/questions/tagged/angular2-mdl.

Here is a plnkr if you'd like to play around http://plnkr.co/edit/I3dLfLUDIH2xlEJqj0da?p=preview.

Status of the npm package version 2 (mdl version 1.3.0; angular 2 final)

  • Badges
  • Buttons
  • Cards
  • Chips
  • Dialogs (imperative and declarative)
  • Icons
  • Loading
  • Shadow
  • Toggle (Checkbox, Radio, Icon Toggle, Switch)
  • Lists
  • Slider
  • Snackbar
  • Table
  • Tooltips
  • Menu
  • Layout (standard, scroll, waterfall, tabs)
  • Tabs
  • Textfields (multiline, expandable)

Installation

npm install angular2-mdl --save

How to use the mdl components with webpack

Just use it. Add the MdlModule to your NgModule imports and you are done!

How to use the mdl components with system js

You need to configure your system-config.js file:

const map: any = {
  'angular2-mdl': 'vendor/angular2-mdl'
};

/** User packages configuration. */
const packages: any = {
  'angular2-mdl': { main: 'bundle/angular2-mdl.js'}
};

css from material-design-lite

You may include the material-deisgn-lite css in your html and you're done!

<link rel="stylesheet" href="https://code.getmdl.io/1.1.3/material.indigo-pink.min.css" />
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

Under http://mseemann.io/angular2-mdl/theme you'll find a customizing tool to change the theme colors.

How to use the scss files from material-design-lite

This package includes the scss files from material-design-lite. With these files you are able to change the colors and other variables in your own scss files:

@import "~angular2-mdl/scss/color-definitions";

$color-primary: $palette-blue-500;
$color-primary-dark: $palette-blue-700;
$color-accent: $palette-amber-A200;
$color-primary-contrast: $color-dark-contrast;
$color-accent-contrast: $color-dark-contrast;

@import '~angular2-mdl/scss/material-design-lite';

To make this working you need to find out the way how you could tell your build system where the scss is located. For example with webpack you can use the special ~angular2-mdl syntax or you can configure the includePaths:

sassLoader: {
	includePaths: [util.root('node_modules', 'angular2-mdl', 'scss')]
}

Contributing

Every contribution is welcome. Please checkout the CONRIBUTION.md file.

Remarks

This package should work with every version of angular 2. But you should know that this package is compiled with ngc and ngc generates metadata for aot. These metdata are versioned. The following table lists these versions and the correspondig angular version:

| angular2-mdl version | metadata version | angular version | --- | --- | --- | | 2.7.0 | 1 | <2.3.0 | 2.8.0 | 2 | 2.3.0 | >=2.9.0 | 3 | >=2.3.1

If you need a working example for the current angular-cli with the current angular2-mdl and angular versions please have a look at: https://github.com/mseemann/a2-mdl-webpack.