0
我嘗試添加github.com/sherweb/ng2-materialize到github.com/angular/quickstart下面改變無法添加NG2,兌現到github.com/angular/quickstart
"materialize-css": "",
"mdi": "",
"jQuery": "",
"ng2-materialize": "",
//in Package.json 'dependencies' and 'devDependencies'
systemjs.config.js Image, code below
'jquery': 'npm:jquery',
'materialize-css': 'npm:materialize-css',
'mdi': 'npm:mdi',
'ng2-materialize': 'npm:ng2-materialize',
請檢查器件和模塊image here, code below的組件和模塊
組件
import { MaterializeModule } from 'ng2-materialize';
模塊
@Component({ selector: 'my-app', template: `
<h1>Hello {{name}}</h1>
<div class="card-panel teal lighten-2">This is a card panel with a teal lighten-2 class</div>
`, }) export class AppComponent { name = 'Angular'; }
,但我正確地收到錯誤和itsnot裝載
[0] 1:10:56 PM - Compilation complete. Watching for file changes
[1] 17.02.26 13:10:57 200 GET /main.js
[1] 17.02.26 13:10:57 304 GET /@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js
[1] 17.02.26 13:10:57 200 GET /app/app.module.js
[1] 17.02.26 13:10:57 304 GET /@angular/compiler/bundles/compiler.umd.js
[1] 17.02.26 13:10:57 304 GET /@angular/core/bundles/core.umd.js
[1] 17.02.26 13:10:57 304 GET /@angular/platform-browser/bundles/platform-browser.umd.js
[1] 17.02.26 13:10:57 200 GET /app/app.component.js
........
[1] 17.02.26 13:10:57 404 GET /node_modules/ng2-materialize/
沒有兌現它的加載,它不僅拿起外接Materialise的設計模塊,它也做的NPM開始 - 沒有錯誤除了上述
謝爾蓋它有什麼作用...是一次進口或組件級別進口 –
這是在$一次性進口PROJECT_DIR/src/systemjs.config.js文件。 – Sergey
謝謝謝爾蓋..我很困惑,試圖將它導入到任何地方。非常感謝。 –