Angular 2添加了Markdown插件

时间:2017-07-20 16:55:18

标签: angular

我尝试将angular2-markdown添加到我的角度脚本中但添加后 到app.module.ts我的浏览器抛出错误而不加载应用程序。

我通过npm安装应用程序并将其添加到app.module.ts

@NgModule({
imports:      [
    BrowserModule,
    HttpModule,
    JsonpModule,
    routing,
    FormsModule,
    MarkdownModule.forRoot(),
],

我现在不在应用中的任何地方使用它。从app.module.js中删除表单后,一切运行正常。

我错过了什么吗?我之前从未使用过第三方插件。 如果有人理解angluar想用它说什么,则抛出以下错误消息。

    Error: (SystemJS) expected expression, got '<'
    @http://localhost:3000/app/app.module.js:15:27
    @http://localhost:3000/app/app.module.js:1:31
    @http://localhost:3000/app/app.module.js:1:2
    @http://localhost:3000/app/main.js:7:20
    @http://localhost:3000/app/main.js:1:31
    @http://localhost:3000/app/main.js:1:2
    ZoneDelegate.prototype.invoke@http://localhost:3000/node_modules/zone.js/dist/zone.js:391:17
    Zone.prototype.run@http://localhost:3000/node_modules/zone.js/dist/zone.js:141:24
    scheduleResolveOrReject/<@http://localhost:3000/node_modules/zone.js/dist/zone.js:831:52
    ZoneDelegate.prototype.invokeTask@http://localhost:3000/node_modules/zone.js/dist/zone.js:424:17
    Zone.prototype.runTask@http://localhost:3000/node_modules/zone.js/dist/zone.js:191:28
    drainMicroTaskQueue@http://localhost:3000/node_modules/zone.js/dist/zone.js:595:25
    ZoneTask.invokeTask@http://localhost:3000/node_modules/zone.js/dist/zone.js:502:21
    invokeTask@http://localhost:3000/node_modules/zone.js/dist/zone.js:1364:9
    globalZoneAwareCallback@http://localhost:3000/node_modules/zone.js/dist/zone.js:1382:17

    Evaluating http://localhost:3000/angular2-markdown
    Evaluating http://localhost:3000/app/app.module.js
    Evaluating http://localhost:3000/app/main.js
    Error loading http://localhost:3000/app/main.js
Stack trace:
(SystemJS) expected expression, got '<'
    @http://localhost:3000/app/app.module.js:15:27
    @http://localhost:3000/app/app.module.js:1:31
    @http://localhost:3000/app/app.module.js:1:2
    @http://localhost:3000/app/main.js:7:20
    @http://localhost:3000/app/main.js:1:31
    @http://localhost:3000/app/main.js:1:2
    ZoneDelegate.prototype.invoke@http://localhost:3000/node_modules/zone.js/dist/zone.js:391:17
    Zone.prototype.run@http://localhost:3000/node_modules/zone.js/dist/zone.js:141:24
    scheduleResolveOrReject/<@http://localhost:3000/node_modules/zone.js/dist/zone.js:831:52
    ZoneDelegate.prototype.invokeTask@http://localhost:3000/node_modules/zone.js/dist/zone.js:424:17
    Zone.prototype.runTask@http://localhost:3000/node_modules/zone.js/dist/zone.js:191:28
    drainMicroTaskQueue@http://localhost:3000/node_modules/zone.js/dist/zone.js:595:25
    ZoneTask.invokeTask@http://localhost:3000/node_modules/zone.js/dist/zone.js:502:21
    invokeTask@http://localhost:3000/node_modules/zone.js/dist/zone.js:1364:9
    globalZoneAwareCallback@http://localhost:3000/node_modules/zone.js/dist/zone.js:1382:17

    Evaluating http://localhost:3000/angular2-markdown
    Evaluating http://localhost:3000/app/app.module.js
    Evaluating http://localhost:3000/app/main.js
    Error loading http://localhost:3000/app/main.js

0 个答案:

没有答案