html:
<a href="" ui-sref="detail({ id: slide.id })"> <img class="full-image" ng-src="{{ slide.images }}" alt=""/></a>
路由配置
.state('detail', {
                url: '/detail/:id',
                templateUrl: 'template/detail.html',
                controller: 'DetailCtrl'
            })
控制器获取参数:
// Product detail controller
    .controller('DetailCtrl', function($scope,$stateParams, Product) {
        $scope.product = Product.get($stateParams.id);
        console.log($stateParams.id)
        // generate array from number
        $scope.range = function(n) {
            return new Array(n);
        };
    })

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-13
  • 2022-12-23
  • 2021-06-23
猜你喜欢
  • 2021-09-10
  • 2022-12-23
  • 2022-01-18
  • 2022-12-23
  • 2021-11-03
  • 2022-12-23
相关资源
相似解决方案