在尝试在Angularjs中创建组件时,我肯定做错了什么。我收到一个错误:
Error: [$injector:modulerr] Failed to instantiate module myApp due to:
Error: [$injector:nomod] Module 'myApp' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
任何指针都会有所帮助。这是我的JSFiddle
答案 0 :(得分:0)
尝试
public foo(): string[] {
return Object.keys(MyEnum).filter(k => {
typeof MyEnum[k] === "number"
}) as string[];
}