小编use*_*989的帖子

angularjs route - 跳转到路由链接上的特定页面部分

我试图在Angular锚和路由之间进行某种混合......

我确实让它在主页上工作,因为锚定部分在那里,但是,如果我在另一个页面,它不会.

任何人都可以指出我正确的方向如何正确地做,请?

这是我到目前为止所拥有的

freddoApp.config(function($routeProvider, $locationProvider) {
    $routeProvider

    // route for the home page
    .when('/', {
        templateUrl : 'pages/home/home.html',
        controller  : 'mainController'
    })

    // route for the productos page
    .when('/productos', {
        templateUrl : 'pages/home/home.html',
        controller  : 'mainController'
    })

    // route for the unico page
    .when('/unico', {
        templateUrl : 'pages/home/home.html',
        controller  : 'mainController'
    })

    // route for the sabores page
    .when('/sabores', {
        templateUrl : 'pages/home/home.html',
        controller  : 'mainController'
    })

    // route for the locales page
    .when('/locales', {
        templateUrl : 'pages/locales/locales.html',
        controller …
Run Code Online (Sandbox Code Playgroud)

html url-routing angularjs angular-routing

3
推荐指数
1
解决办法
1573
查看次数

标签 统计

angular-routing ×1

angularjs ×1

html ×1

url-routing ×1