Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49424

URL state changes but view stays the same (NO TABS)

$
0
0

@dmolesworth wrote:

Hi, very new to Ionic & Angular but enjoying the experience provided by the Ionic Team!

I know there are similar questions to this but all use tabs where as I do not. My problem is that after setting up parent & child views, I cannot seem to access my child page, yet my URL changes correctly. My state/views are as follows;

.config(function($stateProvider, $urlRouterProvider){
$stateProvider
.state('profile', {
url: "/profile",
templateUrl: "templates/profile.html",
controller: 'ListController'
})
.state('profile.detail', {
url: '/detail/:aId',
parent: 'profile',
templateUrl: "templates/detail.html",
controller: 'ListController'
})
});

My Controller.js

.controller('ListController',['$scope', '$stateParams', '$http', '$firebaseObject', '$rootScope', '$firebaseArray', '$state', function($scope, $stateParams, $state, $http, $firebaseObject, $firebaseArray, $rootScope){
          var listData = new Firebase("https://****.firebaseio.com/");
          $scope.report = $firebaseArray(listData);
            $scope.whichartist = $stateParams.aId;

}]);

Parent view (profile.html)

<ion-list>
        <ion-item ng-repeat="item in report | filter: query"
                  class="item-thumbnail-left item-text-wrap"
                  href="#/profile/detail/{{item.Time}}">
        </ion-item>
</ion-list>

And Child view (detail.html)

<ion-view>
    <ion-content>
        <ion-list class="list-inset">
            <ion-item class="item-text-wrap"
                      ng-repeat="item in listData | filter: {{myLocation: whichartist}}">
            </ion-item>
        </ion-list>
    </ion-content>
</ion-view>

This results in no errors in the console and a correct URL state change but no change to view.

Any help greatly appreciated!

Duncan

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49424


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>