首页 > 解决方案 > 如何使用 Angular JS 链接到另一个页面

问题描述

如何将"link" : "#mathematics"php 中的以下内容链接到另一个名为 php 的页面mathematics.php

<script>
var app = angular.module('progressApp', []);

app.controller('progressBars', ['$scope',
    function($scope) {
        $scope.fundData = [{
            "fund": "Mathematics",
            "goal": "400",
            "raised": "389",
            "link": "#mathematics"
        }, {
            "fund": "Physics",
            "goal": "350",
            "raised": "169",
            "link": "#physics"
        }, {
            "fund": "Chemistry",
            "goal": "350",
            "raised": "203",
            "link": "#chemistry"
        }, {
            "fund": "Programming",
            "goal": "350",
            "raised": "299",
            "link": "#programming"
        }];
    }
]);</script>

如何将 替换#为链接到 php 页面的代码?

标签: javascriptphp

解决方案


推荐阅读