2
私はアプリを使っています。前後の設定に進むと、画面に表示されるユーザーの設定を維持したいと思います。私は、入力フィールドにapp.home
型何かから行くのであれば、その後app.settings
に移動して戻っapp.home
に私はまだで、同じものを見てみたいui-router keep controller active
'use strict';
/**
* Initialize the router's default behaviors
*/
// @ngInject
function initRouter($urlRouterProvider: angular.ui.IUrlRouterProvider,
$stateProvider: angular.ui.IStateProvider): void {
$urlRouterProvider.otherwise('/main');
$stateProvider
.state('app', {
abstract: true,
views: {
'header': {
templateUrl: '/angular/app/components/_header/headerView.html'
},
'sidebar': {
templateUrl: '/angular/app/components/_sidebar/sidebarView.html'
}
}
})
.state('app.home', {
url: '/main',
views: {
'[email protected]': {
templateUrl: '/angular/app/components/landing/landingView.html',
controller: 'LandingController',
controllerAs: 'vm'
}
}
})
.state('app.settings', {
url: '/config',
views: {
'[email protected]': {
templateUrl: '/angular/app/components/settings/settingsView.html',
controller: 'settingsController',
controllerAs: 'vm'
}
}
});
}
angular.module('app').config(initRouter);
を:
私のルートは、次のように構成されています私の入力