I have a view that has two modes - view and edit. I'm using angular so I will be using some directives to change the behavior of the page based on what mode it's in. I know it's common in C to #DEF some constant strings for use later. I was wondering if there is a good design pattern similar to this for use in JS. For example I will be doing something like:
<input ng-if="mode==='edit'"></input>
Notice the string literal 'edit'