Skip to content

enableProdMode console message is too mysterious #6189

@ewinslow

Description

@ewinslow

I got this message in the console:

Angular 2 is running in the development mode. Call enableProdMode() to enable the production mode.

Curious, I behaved literally and typed this into the console:

enableProdMode();

At which point I was greeted with this error:

VM1256:2 Uncaught ReferenceError: enableProdMode is not defined(…)(anonymous function) @ VM1256:2
InjectedScript._evaluateOn @ VM1126:875
InjectedScript._evaluateAndWrap @ VM1126:808
InjectedScript.evaluate @ VM1126:664

This console message should link to docs explaining what enableProdMode is and an example of how exactly to enable it. For example, something like this would have been much clearer (not sure if this is how you do it exactly):

import {enableProdMode} from "angular2/core";

enableProdMode();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions