Gré*_*EUT 13 typescript webpack angular-cli angular ngx-leaflet
我在我的项目中使用了插件ngx-leaflet和angular-cli.
我正在尝试使用文档中描述的传单,例如:
问题是当我尝试编译时出现以下错误:
编译:
ng serve --aot
Run Code Online (Sandbox Code Playgroud)
上下文:
我确实尝试L使用以下方式导入:
import { LeafletModule } from '@asymmetrik/ngx-leaflet';
但我在文档和github中找不到任何东西.
我确实删除了模块atm进行编译,但我需要一个解决方法.
这是package.json我使用的:
这是我的组件内部的代码,用户'L':
@Component({
selector: 'app-map-screens-element',
templateUrl: './map-screens-element.component.html',
styleUrls: [
'./map-screens-element.component.scss',
],
})
export class MapScreensComponent implements OnInit {
/**
* setting map options
*/
public $mapOptions = {
// we use the layer openstreetmap
layers: [
L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'),
],
zoom: 15,
center: L.latLng([48.866667, 2.333333]),
};
}
Run Code Online (Sandbox Code Playgroud)
这里将模块导入我的项目:
import { LeafletModule } from '@asymmetrik/ngx-leaflet';
@NgModule({
imports: [
LeafletModule,
],
declarations: [
// ...
],
exports: [
// ...
],
})
export class SharedElementModule { }
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6798 次 |
| 最近记录: |