2014-10-28 25 views
0

我需要一些幫助,我有一個帶有Dribbble用戶列表的Ionic應用程序,使用他們的API。當我選擇用戶時,我想根據$ stateParams帶來的ID來提供用戶詳細信息。

我是Angular和Ionic的新手,幫助太棒了! 我讀過服務和兒童狀態,但我不知道如何正確地做到這一點。

這是存儲庫:https://github.com/matheusbaumgart/yo-ionic-eyedentify.git 如果你們可以看看。

非常感謝。

回答

0

您是在正確的道路上:

function ($scope, $stateParams, Api, $ionicModal) { 
    $scope.patients = []; 
    $scope.selected = {}; 

    // assign the variable from the previous state like this, then use it how you need 
    $scope.pid = $stateParams.patientId; 
相關問題