无法从material.module'未声明或导入'中导出垫模块

时间:2019-05-14 12:19:05

标签: angular7 angular-material-7

我正在尝试在创建垫子表时从我的material.module.ts中导出模块。但是当我运行localhost时它什么也不显示,因为它给出以下错误。我该如何解决?

"values": {
    "vals": {
        "key": "Vals",
        "name": "Vals",
        "vizType": "info/dual_timeseries_combination",
        "value": ["Values1", "Values2"],
        "dataset": {
            "dimensions": [{
                "name": "Zeit",
                "value": "{Zeit}",
                "dataType": "date"
            }],
            "measures": [{
                "name": "Values2",
                "value": "{Values2}"
            },{
                "name": "Values1",
                "value": "{Values1}"
            }],
            "data": {
                "path": "/vals"
            }
        },
        "vizProperties": {
            "general": {
                "groupData": false
            },
            "scales": {
                "valueAxis": {
                    "max": "auto",
                    "min": 0,
                    "type": "linear"
                }
            },
            "plotArea": {
                "line": {
                    "marker": {
                        "visible": false
                    }
                },
                "dataShape": {
                    "primaryAxis": ["line", "bar" ,"bar"]
                },
                "dataPointStyle": {
                    "rules": [{
                        "dataContext": {
                            "Values2": {
                                "min": 0
                            }
                        },
                        "properties": {
                            "color": "sapUiChartPaletteQualitativeHue2"
                        }
                    }],
                    "others": {
                        "properties": {
                            "color": "sapUiChartPaletteQualitativeHue1"
                        }
                    }
                },
                "window": {
                    "start": "firstDataPoint",
                    "end": "lastDataPoint"
                },
                "dataPoint": {
                    "stroke": {
                        "visible": false
                    },
                    "invalidity": "break"
                },
                "dataLabel": {
                    "visible": false
                }
            },
            "valueAxis": {
                "visible": true,
                "label": {},
                "title": {
                    "visible": false
                }
            },
            "valueAxis2": {
                "visible": true,
                "label": {},
                "title": {
                    "visible": false
                }
            },
            "timeAxis": {
                "levels": ["minute", "hour"],
                "title": {
                    "visible": false
                }
            },
            "legend": {
                "visible": false
            },
            "title": {
                "visible": false
            },
            "interaction": {
                "syncValueAxis": false
            }
        }
    }
}

material.module.ts

Uncaught Error: Can't export directive MatPaginator from MaterialModule as it was neither declared nor imported!

1 个答案:

答案 0 :(得分:0)

出口:[   ...
   MatPaginator ]

您导出模块-而不是指令,组件等。MatPaginator不是模块,因此无法导出。您还需要导出MatPaginatorModule