Table data is normally repeatable by nature. ng-repeat directive can be used to draw table easily. Following example states the use of ng-repeat directive to draw a table. <table> <tr> <th> Name </th> <th> Marks </th> </tr> <tr ng-repeat = "subject in student.subjects" > <td> {{ subject.name }} </td> <td> {{ subject.marks }} </td> </tr> </table> Table can be styled using CSS Styling. <style> table , th , td { border : 1px solid grey ; border - collapse : collapse ; padding : 5px ; } table tr : nth - child ( odd ) { background - color : #f2f2f2; } table tr : nth - child ( even ) { background - color : #ffffff; } </style> Example Following example will showcase all the above mentioned directive. <html> <head> <...
<!-- This Script is from www.crestinfotech.com, Provided by: Manish Vagh -->
<html>
<head>
<style type="text/css">
.style1 {
text-align: center;
}
.style2 {
font-size: 40pt;
color: #0000FF;
font-family: "Times New Roman", Times, serif;
}
.style3 {
font-size: medium;
color: #0000FF;
font-family: "Times New Roman", Times, serif;
}
.style5 {
font-family: "Times New Roman", Times, serif;
border-right-style: solid;
border-right-width: 0px;
border-top-style: solid;
border-top-width: 0px;
background-color: #CCFFFF;
}
.style6 {
text-align: center;
border-left-style: solid;
border-left-width: 0px;
border-right-style: solid;
border-right-width: 0px;
border-top-style: solid;
border-top-width: 0px;
background-color: #CCCCFF;
}
.style8 {
border: 3px dashed #0000CC;
}
.style9 {
font-family: "Times New Roman", Times, serif;
border-right-style: solid;
border-right-width: 0px;
background-color: #CCFFFF;
}
.style11 {
font-family: "Times New Roman", Times, serif;
border-right-style: solid;
border-right-width: 0px;
border-bottom-style: solid;
border-bottom-width: 0px;
}
.style12 {
font-family: "Times New Roman", Times, serif;
padding-left: 10px;
background-color: #CCFFFF;
}
.style13 {
font-family: "Times New Roman", Times, serif;
border-right-style: solid;
border-right-width: 0px;
background-color: #D5F1FF;
}
.style15 {
font-family: "Times New Roman", Times, serif;
border-right-style: solid;
border-right-width: 0px;
border-bottom-style: solid;
border-bottom-width: 0px;
background-color: #D5F1FF;
}
.style17 {
font-family: "Times New Roman", Times, serif;
padding-left: 10px;
background-color: #D5F1FF;
}
.style18 {
font-family: "Times New Roman", Times, serif;
border-left-style: solid;
border-left-width: 0px;
padding-left: 10px;
background-color: #CCFFFF;
text-align: center;
}
.style19 {
font-size: xx-small;
}
</style>
</head>
<body>
<form method="post" action="">
<table align="center" class="style8" style="width: 551">
<tr>
<td class="style6" colspan="2" style="height: 136px"><span class="style2">
<strong class="style11">Contact us</strong></span><br class="style3">
<span class="style3">Tell us what is in your mind</span></td>
</tr>
<tr>
<td class="style12" style="width: 268px; height: 40;"><strong>Your Name:</strong></td>
<td class="style5" style="width: 421px; height: 40;"><span dir="ltr">
<input name="name_msg" size="33" id="fa" dir="ltr" tabindex="1" maxlength="30" lang="fa" style="float: left; width: 204px; height: 25px;" value="" onclick="this.value=''"><div class="style1">
</div>
</span> </td>
</tr>
<tr>
<td class="style17" style="width: 268px; height: 40;"><strong>Your Email:</strong></td>
<td class="style13" style="width: 421px; height: 40;"><span dir="ltr">
<input name="email_msg" size="33" dir="ltr" tabindex="3" maxlength="30" id="fa1" style="float: left; width:204px; height: 25px;" value="" onclick="this.value=''"></span></td>
</tr>
<tr>
<td class="style12" style="width: 268px; height: 40;"><strong>Your website:</strong></td>
<td class="style9" style="width: 421px; height: 40;"><span dir="ltr">
<input name="url_msg" size="21" dir="ltr" tabindex="2" maxlength="30" id="fa0" style="float: left; width: 204px; height: 25px;" value="" onclick="this.value=''"></span></td>
</tr>
<tr>
<td class="style17" style="width: 268px; height: 123px;"><strong>Comment:</strong></td>
<td class="style15" style="width: 421px; height: 123;"><span dir="ltr">
<textarea rows="6" name="msg_body" dir="ltr" id="fa2" tabindex="4" lang="fa" onclick="this.value=''" style="width: 400px"></textarea></span></td>
</tr>
<tr>
<td class="style18" style="height: 78px;" colspan="2">
<span dir="ltr">
<input type="submit" value="Submit" name="submit_msg" tabindex="5" id="fa3" style="float:center; width: 114px; height: 35px;" ><br></span>
<br class="style19"><font face="Tahoma"><a target="_blank" href="http://www.crestinfotech.com/"><span style="font-size: 8pt; text-decoration: none">crestinfotech</span></a></font>
</td>
</tr>
</table>
</form>
</body>
</html><a target="_blank" href="http://www.crestinfotech.com" style="font-size: 8pt; text-decoration: none">CrestInfotech</a>
<html>
<head>
<style type="text/css">
.style1 {
text-align: center;
}
.style2 {
font-size: 40pt;
color: #0000FF;
font-family: "Times New Roman", Times, serif;
}
.style3 {
font-size: medium;
color: #0000FF;
font-family: "Times New Roman", Times, serif;
}
.style5 {
font-family: "Times New Roman", Times, serif;
border-right-style: solid;
border-right-width: 0px;
border-top-style: solid;
border-top-width: 0px;
background-color: #CCFFFF;
}
.style6 {
text-align: center;
border-left-style: solid;
border-left-width: 0px;
border-right-style: solid;
border-right-width: 0px;
border-top-style: solid;
border-top-width: 0px;
background-color: #CCCCFF;
}
.style8 {
border: 3px dashed #0000CC;
}
.style9 {
font-family: "Times New Roman", Times, serif;
border-right-style: solid;
border-right-width: 0px;
background-color: #CCFFFF;
}
.style11 {
font-family: "Times New Roman", Times, serif;
border-right-style: solid;
border-right-width: 0px;
border-bottom-style: solid;
border-bottom-width: 0px;
}
.style12 {
font-family: "Times New Roman", Times, serif;
padding-left: 10px;
background-color: #CCFFFF;
}
.style13 {
font-family: "Times New Roman", Times, serif;
border-right-style: solid;
border-right-width: 0px;
background-color: #D5F1FF;
}
.style15 {
font-family: "Times New Roman", Times, serif;
border-right-style: solid;
border-right-width: 0px;
border-bottom-style: solid;
border-bottom-width: 0px;
background-color: #D5F1FF;
}
.style17 {
font-family: "Times New Roman", Times, serif;
padding-left: 10px;
background-color: #D5F1FF;
}
.style18 {
font-family: "Times New Roman", Times, serif;
border-left-style: solid;
border-left-width: 0px;
padding-left: 10px;
background-color: #CCFFFF;
text-align: center;
}
.style19 {
font-size: xx-small;
}
</style>
</head>
<body>
<form method="post" action="">
<table align="center" class="style8" style="width: 551">
<tr>
<td class="style6" colspan="2" style="height: 136px"><span class="style2">
<strong class="style11">Contact us</strong></span><br class="style3">
<span class="style3">Tell us what is in your mind</span></td>
</tr>
<tr>
<td class="style12" style="width: 268px; height: 40;"><strong>Your Name:</strong></td>
<td class="style5" style="width: 421px; height: 40;"><span dir="ltr">
<input name="name_msg" size="33" id="fa" dir="ltr" tabindex="1" maxlength="30" lang="fa" style="float: left; width: 204px; height: 25px;" value="" onclick="this.value=''"><div class="style1">
</div>
</span> </td>
</tr>
<tr>
<td class="style17" style="width: 268px; height: 40;"><strong>Your Email:</strong></td>
<td class="style13" style="width: 421px; height: 40;"><span dir="ltr">
<input name="email_msg" size="33" dir="ltr" tabindex="3" maxlength="30" id="fa1" style="float: left; width:204px; height: 25px;" value="" onclick="this.value=''"></span></td>
</tr>
<tr>
<td class="style12" style="width: 268px; height: 40;"><strong>Your website:</strong></td>
<td class="style9" style="width: 421px; height: 40;"><span dir="ltr">
<input name="url_msg" size="21" dir="ltr" tabindex="2" maxlength="30" id="fa0" style="float: left; width: 204px; height: 25px;" value="" onclick="this.value=''"></span></td>
</tr>
<tr>
<td class="style17" style="width: 268px; height: 123px;"><strong>Comment:</strong></td>
<td class="style15" style="width: 421px; height: 123;"><span dir="ltr">
<textarea rows="6" name="msg_body" dir="ltr" id="fa2" tabindex="4" lang="fa" onclick="this.value=''" style="width: 400px"></textarea></span></td>
</tr>
<tr>
<td class="style18" style="height: 78px;" colspan="2">
<span dir="ltr">
<input type="submit" value="Submit" name="submit_msg" tabindex="5" id="fa3" style="float:center; width: 114px; height: 35px;" ><br></span>
<br class="style19"><font face="Tahoma"><a target="_blank" href="http://www.crestinfotech.com/"><span style="font-size: 8pt; text-decoration: none">crestinfotech</span></a></font>
</td>
</tr>
</table>
</form>
</body>
</html><a target="_blank" href="http://www.crestinfotech.com" style="font-size: 8pt; text-decoration: none">CrestInfotech</a>
Comments
Post a Comment
Comment