0
私はダッシュボードを持っています。私はスーパー管理者です。ユーザープロファイルを作成して、すべてのプロファイルデータを表示できます。今、私はすべてのユーザーのテーブルを持って、私は開いて、必要に応じて、いくつかのユーザーのユーザープロファイルを編集したい。ここ は、ログインしたユーザーのために
<a href="#" class="btn btn-primary btn-block btn-sm" ui-sref="user-profile/:userID">{{'USER_PROFILE'| translate}}</a>
そして、ここでは、私は今、私はいくつかのユーザーテーブルで選択し、自分のプロフィールを開きたい
.controller('userProfileCtrl', ['$scope', '$stateParams', '$state', '$http','userProfileFactory',
function ($scope, $stateParams, $state, $http, userProfileFactory) {
$scope.authentication = authService.authentication;
$scope.userID = $scope.authentication.userID;
$stateParams.userID = $scope.userID;
$scope.user = userProfileFactory.get({user: $stateParams.userID});
$scope.user.$promise.then(function (data){
console.log(data.id);
return data;
});
状態のparamsを呼び出すCTRLある)コールユーザープロファイル(のHTMLコードです
<tr ng-repeat="user in users|filter:f" such-href="user-profile/{{user.id}}">
そしてこのCTRL
で一部のユーザープロファイルを呼び出します10そして、ここでは、UIの状態である
.state('user-profile/:userID', {
url: '/user-profile/:userID',
templateUrl: 'aaaa/aaa/aaaae/user-profile.html',
controller: 'aaaaCtrl'
})
問題がある、私は、ユーザーのプロファイルを開く任意の時間は、私は、プロファイルで(スーパー管理データを)私のデータを取得します。