How to enable production mode?

后端 未结 14 1198
忘掉有多难
忘掉有多难 2020-11-29 16:44

I was reading related questions and I found this one, but my question is how can I switch from development to production mode. There are some differences between the modes w

14条回答
  •  时光取名叫无心
    2020-11-29 17:42

    You enable it by importing and executing the function (before calling bootstrap):

    import {enableProdMode} from '@angular/core';
    
    enableProdMode();
    bootstrap(....);
    

    But this error is indicator that something is wrong with your bindings, so you shouldn't just dismiss it, but try to figure out why it's happening.

提交回复
热议问题