0

I am definitely doing something wrong while trying to create a component in Angularjs. I am getting an error:

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.

Any pointers would be helpful. Here is my JSFiddle

1 Answer 1

0

Try

    public foo(): string[] {
        return Object.keys(MyEnum).filter(k => {
            typeof MyEnum[k] === "number"
        }) as string[];
    }

Here is the updated fiddle .

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, but it is still not working. I think I am doing something wrong with the way controller/module setup

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.