Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
@model WebMailModel
ViewData["Title"] = "WebMail";
<ul class="folders" data-bind="foreach: folders">
<li data-bind="text: $data,
css: { selected: $data == $root.chosenFolderId() },
click: $root.goToFolder"></li>
<table class="mails" data-bind="with: chosenFolderData">
<tbody data-bind="foreach: mails">
<tr data-bind="click: $root.goToMail">
<td data-bind="text: from"></td>
<td data-bind="text: to"></td>
<td data-bind="text: subject"></td>
<td data-bind="text: date"></td>
<div class="viewMail" data-bind="with: chosenMailData">
<div class="mailInfo">
<h1 data-bind="text: subject"></h1>
<p><label>From</label>: <span data-bind="text: from"></span></p>
<p><label>To</label>: <span data-bind="text: to"></span></p>
<p><label>Date</label>: <span data-bind="text: date"></span></p>
<p class="message" data-bind="html: messageContent" />
@section scripts{
@section styles{
<link href="~/css/webmail.css" rel="stylesheet" type="text/css" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment