Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nwx/mat

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nwx/mat

A simple shared material module for Angular applications

  • 0.0.2-dev-a0d0bee053
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

@nwx/mat

A simple material module wrapper for Angular applications

status-image version-image coverage-image download-image

How to install

npm i @nwx/mat |OR| yarn add @nwx/mat

How to use

// in app.component.ts
import { Component, OnInit } from '@angular/core';
import { MatService } from '@nwx/mat';
import { SvgIcons } from './app.icons';

export const SvgFlagIcons = [
  {
    // country iso & aliases
    names: ['ca', 'CA'],
    // namespace to this icons (flags:ca)
    namespace: 'flags',
    // path to svg flag
    path: 'assets/svg/flags/ca.svg'
  },
  {
    names: ['us', 'US'],
    namespace: 'flags',
    path: 'assets/svg/flags/us.svg'
  }
];

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
  title = 'Neekware';
  constructor(public mat: MatService) {
    this.title = '@nwx/mat';
    console.log('AppComponent loaded ...');
  }

  ngOnInit() {
    // assuming you have your svg icons in your project asset directory
    this.mat.loadSvgIconSet('/assets/svg/mdi/mdi.svg');
    this.mat.loadSvgIconsInNamespace(SvgFlagIcons);
  }
}
<!-- in app.component.html -->

<!-- material design modules -->
<mat-toolbar>@nwx/mat</mat-toolbar>

<h1> Welcome to {{ title }}!</h1>

<!-- icons without namespace -->
<mat-icon color="primary" svgIcon="github-face"></mat-icon>

<!-- icons with namespace -->
<mat-icon color="primary" svgIcon="flags:ca"></mat-icon>

Running the tests

To run the tests against the current environment:

npm run ci:all

License

Released under a (MIT) license.

Version

X.Y.Z Version

`MAJOR` version -- making incompatible API changes
`MINOR` version -- adding functionality in a backwards-compatible manner
`PATCH` version -- making backwards-compatible bug fixes

Keywords

FAQs

Package last updated on 29 May 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc