In ambient enum declarations member initializer must be constant expression.(二)

怪我傻逼了,没有贴出代码。相关代码如下:

这是模板内容,超级简单吧

这是填充的数据

这里贴出官网上的代码地址https://swimlane.gitbooks.io/ngx-datatable/content/introduction/getting-started.html,一个超级简单的例子作为开端我都编译失败了。

上面右图的模板template是静态的其中的内容可以写到html文件里,不过要增加templateUrl:"app.component.html"

 

所以一切都是看似没有问题的。鬼知道究竟真正的错误原因是什么,解决方案网上也没有。。。

原文地址:https://www.cnblogs.com/shiyinan/p/7527581.html