Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
A simple material module wrapper for Angular applications
npm i @nwx/mat |OR| yarn add @nwx/mat
// in app.component.ts
import { Component, OnInit } from '@angular/core';
import { MatService } from '@nwx/mat';
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>
This module automatically includes flex-layout module as well. Any module that needs angular material or angular flex-layout must import MatModule
To run the tests against the current environment:
npm run ci:all
Released under a (MIT) license.
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
FAQs
A simple shared material module for Angular applications
The npm package @nwx/mat receives a total of 0 weekly downloads. As such, @nwx/mat popularity was classified as not popular.
We found that @nwx/mat demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.