Observable arrays let us define a list of items as an observable item so that the object-changing values get reflected in the view components. Let us review this scenario with an example:
- We will add a function Employee and an observableArray organization to the page, and try to load the Employee array in the page as a table. For this, include the following web page content to the index.html page:
<!DOCTYPE html> <html> <head> <title>Knockout JS</title> </head> <body> <h1>Welcome to Knockout JS programming</h1> <table border="1" > <tr > <th colspan="2" style="padding:10px;"> <b>Employee Data - Organization : <span style="color:red" data-bind='text: organizationName'> </span> </b> </th> </tr> <tr> <td style="padding:10px;">Employee ...