Here's a set of data that needs to be shown with the effect of a picture wall, which is dynamic, maintained with ANGULARJS, and can be added and deleted.
A maximum of 4 cells per line on the interface.
Here's the code:
The
code is as follows: <! DOCTYPE html>
<html ng-app= "app" >
<head lang= "en" >
<meta charset= "UTF-8" >
<link rel= "stylesheet" href= "Css/bootstrap.min.css" >
<script src= "Js/angular.min.js" ></script>
<title> Table Interface </title>
<style type= "Text/css" >
Ul{list-style:none;}
</style>
</head>
<body ng-controller= "Myctrl" >
<div class= "Row" >
<div class= "col-sm-12" >
<h3 class= "Label-info" >{{title}}</h3>
<input type= "button" value= "Add new list" class= "Btn-primary" >
</div>
</div></p> <p><div class= "Row" >
<ul class= "" >
<li ng-repeat= "I in Tasklist.all" >
<div class= "col-xs-6 col-sm-4 col-md-3" >
<div class= "thumbnail" ></p> <p> <input type= "text" ng-model= "I.title" style= "width:100%" >
<ul>
<li ng-repeat= "J in I.list" >
<input type= "checkbox" ng-model= "J.done" >
<input type= "text" ng-model= "J.item" >
</li>
</ul></p> <p>
</div>
</div>
</li></p> <p> </ul></p> <p></div></p> <p>
<script>
var app=angular.module ("App", [], function () {
Console.log (' started ');
});</p> <p> var mytasklist={
"All": [
{title: "This is the first list",
list:[{"Done": "false", "Item": "Detail 1"},
{"Done": "false", "Item": "Detail 2"},
{"Done": "false", "Item": "Detail 3"},
{"Done": "false", "Item": "Detail 43"}
]},</p> <p> {title: "This is the 2nd list",
list:[{"Done": "false", "Item": "Detail 1"},
{"Done": "false", "Item": "Detail 2"},
{"Done": "false", "Item": "Detail 33"},
{"Done": "false", "Item": "Detail 4"}
]},</p> <p> {title: "This is the 3rd list",
list:[{"Done": "false", "Item": "Detail 1"},
{"Done": "false", "Item": "Detail 25"},
{"Done": "false", "Item": "Detail 3"},
{"Done": "false", "Item": "Detail 4"}
]},
{title: "This is the first list",
list:[{"Done": "false", "Item": "Detail 1"},
{"Done": "false", "Item": "Detail 2"},
{"Done": "false", "Item": "Detail 3"},
{"Done": "false", "Item": "Detail 43"}
]},</p> <p> {title: "This is the 2nd list",
list:[{"Done": "false", "Item": "Detail 1"},
{"Done": "false", "Item": "Detail 2"},
{"Done": "false", "Item": "Detail 33"},
{"Done": "false", "Item": "Detail 4"}
]},</p> <p> {title: "This is the 3rd list",
list:[{"Done": "false", "Item": "Detail 1"},
{"Done": "false", "Item": "Detail 25"},
{"Done": "false", "Item": "Detail 3"},
{"Done": "false", "Item": "Detail 4"}
]},
{title: "This is the 4th list",
list:[{"Done": "false", "Item": "Detail 13"},
{"Done": "false", "Item": "Detail 2"},
{"Done": "false", "Item": "Detail 33"},
{"Done": "false", "Item": "Detail 4"}
]}</p> <p></p> <p>]
};
App.controller ("Myctrl", function ($scope) {
$scope. title= "used here to demonstrate a tabular layout, such as a photo wall";
$scope .tasklist=mytasklist;</p> <p>
});
</script>
</body>
</html>