[英]How to define a private constant variable in Angular 2+ components
Do we have something like private static variable in component itself.我们在组件本身中是否有类似私有静态变量的东西。 Not like Global Constants , But something private to the class (component) itself.
不像Global Constants ,而是类(组件)本身私有的东西。
你需要private readonly constant = 'constant'
;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.