File tree Expand file tree Collapse file tree 1 file changed +38
-1
lines changed Expand file tree Collapse file tree 1 file changed +38
-1
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,44 @@ The [Materialize](https://github.com/InfomediaLtd/angular2-materialize/blob/mast
79
79
</div>
80
80
` ` `
81
81
82
- #### Installing angular2- materialize with JSPM
82
+ #### Installing and configuring angular2- materialize with webpack
83
+
84
+ Install MaterializeCSS and angular2- materialize from npm
85
+ ` ` ` sh
86
+ npm install materialize-css --save
87
+ npm install angular2-materialize --save
88
+ ` ` `
89
+
90
+ Add the Google MD fonts to your index .html :
91
+ ` ` ` html
92
+ <link href="http://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
93
+ ` ` `
94
+
95
+ Add the following aliases and loader to your webpack configuration:
96
+ ` ` ` js
97
+ module.exports = {
98
+ //...
99
+ resolve: {
100
+ alias: {
101
+ materializecss: 'materialize-css/dist/css/materialize.css',
102
+ materialize: 'materialize-css/dist/js/materialize.js',
103
+ //...
104
+ },
105
+ module: {
106
+ loaders: [
107
+ {
108
+ test: /materialize-css\/ dist\/ js\/ materialize\. js/,
109
+ loader: 'imports?materializecss'
110
+ },
111
+ //...
112
+ ]
113
+ }
114
+ //...
115
+ };
116
+ ` ` `
117
+ Notice that the imports loader is required for this setup.
118
+
119
+ #### Installing and configuring angular2- materialize with jspm
83
120
84
121
Install MaterializeCSS, by providing overrides for its dependencies:
85
122
` ` ` sh
You can’t perform that action at this time.
0 commit comments