ng-click="action.toPage(‘tab.home-recommend-topic-detail‘)"
<!-------------------- 话题精选 -----------------------> <section class="white_bg topics "> <header class="fix_container "> <div class="fix_top_left" id="topics_mark"><i class="icon-topic"></i></div> <ul id="topic_title" > <li ng-repeat="topic in data.topics" class="font_16_14 black_title one_line_text" ng-click="action.toPage(‘tab.home-recommend-topic-detail‘)"> #{{topic}}# </li> </ul> <button class="btn blue_text_btn fix_top_right" ng-click="">更多</button> </header> </section>
控制器的代码:
angular.module(‘MrTrustApp.controllers‘) .controller(‘HomeCtrl‘, function ($scope, $state, StateGo, $ionicPopover, $timeout) { // 跳到某页面 (不带参数, 单纯跳转) $scope.action.toPage = function(state){ StateGo.go(state); }; });
原文:http://www.cnblogs.com/hu-clover/p/5410535.html