I need to assign department to an employee in angularJS application. I created API resource on server side which returns JSON array of possible values.
[
{"id":0,"name":"human resources"},
{"id":1,"name":"public relations"},
{"id":2,"name":"development"}
]
And my Employee resource works with IDs of department, like so..
{
employeeId: 1,
firstName: "Adam",
lastName: "Abrons",
departmentId: 2
}
I want to use those values in angular filter for viewing employee and for ngOptions directive for editing employee.
Since those enum values are pretty much stable, how do I load them once and keep them on client side until user leaves the website?