是否有可能在 SPA 应用程序中用 mvc 4 打开许多 Windows 。
我的意思是我有一个用户列表。 打开一个用户可以让我看到一个视图, 然后我可以回到同一个视图,打开另一个。 然后选择直接转到第一个显示该用户状态的开放用户。
我不知道你是否理解我的问题
是否有可能在 SPA 应用程序中用 mvc 4 打开许多 Windows 。
我的意思是我有一个用户列表。 打开一个用户可以让我看到一个视图, 然后我可以回到同一个视图,打开另一个。 然后选择直接转到第一个显示该用户状态的开放用户。
我不知道你是否理解我的问题
我认为你可能误解了单页应用程序是什么。 它按照与普通网页完全相同的规则运行, 除了您不能从页面上浏览之外 。
没有窗口等东西, 它们只是跳出模拟真正的应用程序窗口。 您描述的完全有可能您只需要创建正确的 divs 和 位置/ 配置正确即可。 例如, 前几天我写了 KO 的窗口管理器, 它模仿了窗口 7 的外观和感觉 。
你可以在这里找到它。
我提醒大家,单页应用程序是一个高级主题,在了解其影响之前,你应该非常谨慎地研究它们。
<强 > EDIT 强 >
您的视图模式有多种方法可以分隔。 我总是有一个整个应用程序的主视图模式。 在您的情况中, 我会用 javascript 创建一个用户视图模式类, 并在添加到某些可观测数组之前新建一个新的 。
var user1 = new UserViewModel(ajaxdata);
self.users.push(user1);
var user2 = new UserViewModel(ajaxdata);
self.users.push(user2);
<div data-bind="foreach: users">
<div>
... your user window markup goes here
</div>
</div>
您可以选择使用模板绑定而不是内嵌模板。 至于装入由您上传的数据。 您可以在更新用户ViewModel 之前执行ajax调用以获取用户数据, 或者您可以在初始时装入所有数据, 并在您想要显示时将其更新 。
希望这能帮上忙
For each controller have a folder (with the same name controler), and for each action a script file. For each file is creating a bundle following the pattern: "~/Scripts/Controllers/{controller-name}/...
I have a page containing a list of clients with an ActionLink that allows the user to display (or hide) "inactive" clients. The showInactive=True is attached to the url as a querystring to the ...
I have a couple of properties in my view model that are display-only but I need to retrieve their values using jQuery to perform a calculation on the page. The standard Html.DisplayFor() method just ...
We are evaluating Windows Workflow Foundation 4 to use in MVC 3 based Web Applications. We would like to create flexible order workflows for different projects. Does anybody know good information ...
May be my question is crazy. 1) ASP.net MVC is stateless, so there is no session involved in here. How does the authentication module work and do you have any articles which you can point me to ...
I m trying the render an HTML list that looks like the following, using the Razor view engine: <ul> <li id="item_1">Item 1</li> <li id="item_2">Item 2</li> </ul&...
I have the link below on a razor page: @Html.ActionLink("Create New Profile", "Create", "Profile", new { @class="toplink" }) It appears in thes source of view page as shown below: <a href="/...
MVC 2 我们可以轻松地创造领域。 现在,我的问题涉及nes地区(地区内)。