我遇到一个问题,在某种情况下状态转换会发生两次。我有一个包含多个 SPA 的应用程序。我使用 MVC 路由来服务每个 SPA,并在每个 SPA 中使用 Angular ui 路由器来处理路由。
下图显示了下拉列表,其中下拉列表中的每个项目都是指向不同 SPA 的链接
下图显示了单击 SPA 链接时显示的选项卡。
我遇到的问题特定于以下步骤。
以下是相关代码片段。
路线:
angular.module('settings').config(routeConfig);
routeConfig.$inject = ["$stateProvider", "$urlRouterProvider"];
function routeConfig($stateProvider, $urlRouterProvider) {
// default route
$urlRouterProvider.when('', 'Tab1');
$stateProvider.state('Tab1',
{
url: '/Tab1',
templateUrl: '/link/To/template.html',
controller: 'tab1controller as ctrl'
});
$stateProvider.state('Tab2',
{
url: '/Tab2',
templateUrl: '/link/To/template.html',
controller: 'tab2controller as ctrl'
});
$stateProvider.state('Tab3',
{
url: '/Tab3',
templateUrl: '/link/To/template.html',
controller: 'tab3controller as ctrl'
});
Run Code Online (Sandbox Code Playgroud)
标签 HTML:
<li role="presentation"><a role="tab" …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用该命令启动 mysql 服务器
sudo /etc/init.d/mysql start
但它不会开始。我没有得到一个特定的错误,我看到的是
* Starting MySQL database server mysqld [fail]
我尝试了相同的命令,但使用了restart相同的结果。我也试过用
sudo service start mysql
我被困在这一点上。如果我能提供更多信息,请告诉我。
谢谢你。
这是我的 mysql error.log
150505 21:43:49 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
150505 21:43:49 [Note] Plugin 'FEDERATED' is disabled.
150505 21:43:49 InnoDB: The InnoDB memory heap is disabled
150505 21:43:49 InnoDB: Mutexes and rw_locks use GCC atomic builtins
150505 …Run Code Online (Sandbox Code Playgroud)