how to create a page push in angularjs using the ionic framework? -
i have following structure idea when click item, taken page post.html
controller:
$scope.showpost = function (index) { $rootscope.postcontent = $scope.items[index]; $scope.navi.pushpage('post.html'); //this not work, want create take me page };
html:
<ion-item ng-click="showpost($index)">here</ion-item>
define route (see http://angular-ui.github.io/ui-router/sample/#/)
then inject $state in controller declaration , :
$state.go('post.html')
ps : populating rootscope bad practice.
Comments
Post a Comment