search

Home  >  Q&A  >  body text

angular.js - What is the difference between value and constant in angularjs besides whether they can be modified?

What is the difference between value and constant in angularjs besides whether they can be modified?

为情所困为情所困2832 days ago785

reply all(1)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-05-15 17:03:28

    Another point may be the effective time. constant因为是注册的是静态值(常量),所以它可以在其他valuefactoryservice生效之前生效。话优点绕,简单说,就是constantcan be injected and used during config, but the other ones cannot

    reply
    0
  • Cancelreply