Library File and Meta-Class Enumeration
Explore how to create enumeration attributes in JavaScript by defining a meta-class Enumeration. Understand how to build simple enumerations and code lists, normalize labels for readability, and secure properties as read-only. This lesson helps you extend your app's model validation using custom enumeration types without external libraries.
We'll cover the following...
We'll cover the following...
Add the library file Enumeration.js
The folder structure of our EnumerationApp extends the structure of the validation application by adding the Enumeration.js file in the lib folder. Because of this, we get the following folder structure with four files in the lib folder:
Thus, we get the following folder structure with four files in the lib folder: ...