Gathering detailed insights and metrics for ng-md-theme-loader
Gathering detailed insights and metrics for ng-md-theme-loader
Gathering detailed insights and metrics for ng-md-theme-loader
Gathering detailed insights and metrics for ng-md-theme-loader
Adds your AngularJS Material custom theme css into your webpack Javascript Bundle
npm install ng-md-theme-loader
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
4 Stars
7 Commits
1 Watchers
1 Branches
1 Contributors
Updated on Nov 28, 2017
Latest Version
1.0.1
Package Id
ng-md-theme-loader@1.0.1
Size
2.89 kB
NPM Version
5.3.0
Node Version
8.4.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
Adds your AngularJS Material custom theme css into your webpack Javascript Bundle.
ng-md-theme-loader does not minify or process your css at all, and instead uses standard loaders such as sass-loader. This gives you enough flexibility to pick and choose your loaders.
1npm install ng-md-theme-loader --save-dev
Documentation: ng-material's theme implementation
ng-md-theme-loader creates a JS module that registers MD CSS template with $mdThemingProvider e.g.
1require('!ng-md-theme-loader!file.theme.css');
generates the javascript:
1angular.module('ngMaterial').run(['$mdThemingProvider', function(c) { c.registerStyles('content of the ?.theme.css file') }]);
module
By default ng-md-theme-loader adds a run method to the global 'ngMaterial' module which should be explicitly required by your app for using Angular Material.
You can override this by setting the module
parameter, e.g.
1require('!ng-md-theme-loader?module=myApp!file.theme.css');
generates the javascript:
1angular.module('myApp').run(['$mdThemingProvider', function(c) { c.registerStyles('content of the ?.theme.css file') }]);
NOTE: specified module should be preliminary defined in your application
module
parameter is interpolated using
Webpack's standard interpolation rules.
This module relies on angular being available on window
object. However, in cases angular is connected from node_modules
via require('angular')
, option to force this module to get the angular should be used:
1require('!ng-md-theme-loader?requireAngular!file.theme.css');
generates the javascript:
1var angular = require('angular'); 2angular.module('ngMaterial').run(['$mdThemingProvider', function(c) { c.registerStyles('content of the ?.theme.css file') }]);
It's recommended to adjust your webpack.config
so ng-md-theme-loader
is applied automatically on all files ending with e.g. .theme.css
. For Webpack 1 this would be something like:
1module.exports = { 2 module: { 3 loaders: [ 4 { 5 test: /\.theme\.css$/, 6 loader: 'ng-md-theme' 7 }, 8 { 9 test: /\.theme\.scss$/, 10 loader: 'ng-md-theme!sass' 11 } 12 // other loaders... 13 ] 14 } 15};
For Webpack 2 this would be something like:
1module.exports = { 2 module: { 3 rules: [ 4 { 5 test: /\.theme\.css$/, 6 use: [ 7 { loader: 'ng-md-theme-loader'}, 8 ] 9 }, 10 { 11 test: /\.theme\.scss$/, 12 use: [ 13 { loader: 'ng-md-theme-loader'}, 14 { loader: 'sass-loader' } 15 ] 16 } 17 // other loaders... 18 ] 19 } 20};
Make sure you already have sass-loader
installed. Then you only need to write: require('file.theme.css')
.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
4 existing vulnerabilities detected
Details
Reason
Found 0/7 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More