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

ng2-bwired-materialize

v1.4.2

Published

An Angular 2+ wrap around Materialize library

Downloads

2

Readme

Why ng2-materialize?

We are aware that alternatives exposing Material Design components already exist. But, in our case, we want to rely on a stable css framework that does not depend on a specific js framework.

We already know the possibilities Materialize offers. What is left to do is to wrap components that we want to use in Angular component.

If you want to use a component that is not yet implemented, simply wrap the existing Materialize components that already meets the Material Design specifications. No need to be an HTML/CSS expert, only to know the Angular 2+ components. Or if you are in a hurry, you can use it directly in HTML rather than in Angular component.

Installation

The following commands will add Ng2-Materialize library to your package.json file along with it dependencies: Materialize CSS, jQuery and Mdi (Mdi icons library is optional as your are free to use the icon library of your choice).

npm install --save ng2-materialize
npm install --save mdi    #optional

Don't forget to include jQuery, Materialize, and Mdi in your application.

If you are using Angular-CLI you can follow the example below :

.angular-cli.json

"styles": [
  "styles.scss",
+ "../node_modules/materialize-css/dist/css/materialize.css",
+ "../node_modules/mdi/css/materialdesignicons.css"   #optional
],
"scripts": [
+ "../node_modules/jquery/dist/jquery.js",
+ "../node_modules/materialize-css/dist/js/materialize.js"
],

tsconfig

{
  "compilerOptions": {
    "sourceMap": true,
    "declaration": false,
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "lib": [
      "es2016",
      "dom"
    ],
    "outDir": "../out-tsc/app",
    "target": "es5",
    "module": "es2015",
    "baseUrl": "",
    "types": [
+      "jquery",
+      "materialize-css"
    ]
  },
  "exclude": [
    "test.ts",
    "**/*.spec.ts"
  ]
}

See also Angular CLI 3rd Party Library Installation and Using MaterializeCSS with your Angular 2 Angular CLI App.

Usage

You must import MaterializeModule inside your module to be able to use Materialize components.

import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
+ import { MaterializeModule } from 'ng2-materialize';

import { HomeComponent } from './home.component';

@NgModule({
  imports: [
    CommonModule,
+    MaterializeModule.forRoot(),
  ],
  declarations: [ HomeComponent ],
})
export class HomeModule { }

Available features

Page listed in Native CCS Class will not be wrapped.

Components

  • Badge
  • Button
  • Card
  • Checkbox
  • Collapsible
  • Collection
  • Dropdown
  • Icon
  • Input
  • Modal
  • Navbar
  • Parallax
  • Progress
  • Radio-Button
  • Select
  • Sidenav
  • Spinner
  • Textarea
  • Toast
  • Tooltip

Services

  • Media

Demo application

A demo application is available at https://sherweb.github.io/ng2-materialize/, or refer to the ./demo-app folder and its README.

Road map

We (at SherWeb) are currently wrapping the components as we need them, and unfortunately, we cannot provide a specific road map.

If some components are missing, feel free to contribute.

Contribute

Contributions are always welcome.

Make sure that :

  • Your code style matches with the rest of the project
  • Unit tests pass
  • Linter passes

And you are ready to go!

Credits

Thanks to Ali Mohammadi for donating the npm package name.