如何在Visual Studio 2017中配置Angular2构建过程

时间:2017-07-05 09:29:20

标签: angular npm webpack visual-studio-2017

我创建了这样的新应用:dotnet new angular。然后,开始吧。一切都很好。

然后我添加了包"@agm/core": "1.0.0-beta.1"以及this文章中的所有内容。推出:一切都好,我可以看到地图。

但是,如果我停止项目,然后再次启动它而不进行任何更改 - 我在Type parse时出错。看起来停止对包做些什么。

我又开始了。一开始就一切正常,但刚刚页面重新加载 - 错误。

这是一个错误

An unhandled exception occurred while processing the request.

Exception: Call to Node module failed with error: Error: Template parse errors:
Can't bind to 'latitude' since it isn't a known property of 'agm-map'.
1. If 'agm-map' is an Angular component and it has 'latitude' input, then verify that it is part of this module.
2. If 'agm-map' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("
<nav-menu></nav-menu>
<hr />
<agm-map [ERROR ->][latitude]="lat" [longitude]="lng">
<agm-marker [latitude]="lat" [longitude]="lng"></agm-marker>
"): ng:///AppModule/AppComponent.html@5:21
Can't bind to 'longitude' since it isn't a known property of 'agm-map'.
1. If 'agm-map' is an Angular component and it has 'longitude' input, then verify that it is part of this module.
2. If 'agm-map' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("
<nav-menu></nav-menu>
<hr />
<agm-map [latitude]="lat" [ERROR ->][longitude]="lng">
<agm-marker [latitude]="lat" [longitude]="lng"></agm-marker>
</agm-map>
"): ng:///AppModule/AppComponent.html@5:38

如何设置构建过程并使其正常工作?

0 个答案:

没有答案