本文介绍了如何使用简单的localDB将可修改的教程代码修改为worx的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! HTML:HTML:</head><body> <div ng-controller="tableController"> <table ng-table="usersTable" class="table table-striped"> <tr ng-repeat="user in data"> <td data-title="'Id'"> {{user.id}} </td> <td data-title="'First Name'"> {{user.first_name}} </td> <td data-title="'Last Name'"> {{user.last_name}} </td> <td data-title="'e-mail'"> {{user.email}} </td> <td data-title="'Country'"> {{user.country}} </td> <td data-title="'IP'"> {{user.ip_address}} </td> </tr> </table> </div></body></html> JAVA:JAVA:angular.module('ngTableTutorial', ['ngTable']) .controller('tableController', function ($scope, $filter, ngTableParams) { $scope.users = [{ "id": 1, "first_name": "Philip", "last_name": "Kim", "email": "[email protected]", "country": "Indonesia", "ip_address": "29.107.35.8" }, { "id": 2, "first_name": "Judith", "last_name": "Austin", "email": "[email protected]", "country": "China", "ip_address": "173.65.94.30" }, { "id": 3, "first_name": "Judith", "last_name": "Austin", "email": "[email protected]", "country": "China", "ip_address": "173.65.94.30" },{ "id": 8, "first_name": "Judith", "last_name": "Austin", "email": "[email protected]", "country": "China", "ip_address": "173.65.94.30" }, { "id": 9, "first_name": "Judith", "last_name": "Austin", "email": "[email protected]", "country": "China", "ip_address": "173.65.94.30" }, { "id": 16, "first_name": "Andrea", "last_name": "Greene", "email": "[email protected]", "country": "Russia", "ip_address": "128.72.13.52" }]; $scope.usersTable = new ngTableParams({ page: 1, count: 10 }, { total: $scope.users.length, getData: function ($defer, params) { $scope.data = $scope.users.slice((params.page() - 1) * params.count(), params.page() * params.count()); $defer.resolve($scope.data); } }); }); 控制器:CONTROLLER:using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.Mvc;namespace Magazyn.Controllers{ public class BazaController : Controller { // GET: Baza public ActionResult Index() { return View(); } }} 我需要使用简单的LocalDB或SQLExpress数据库文件而不是$ scope.users ..静态表。???请求帮助。 Thanx:)I need to use simple LocalDB or SQLExpress database file instead $scope.users.. static table.??? Please for Help. Thanx:)推荐答案 这篇关于如何使用简单的localDB将可修改的教程代码修改为worx的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-02 00:25