0
     <!doctype html>
<html lang="en" ng-app="myApp">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <title>My App</title>  

  <link rel="stylesheet" href="lib/onsen/css/onsenui.css">  
  <link rel="stylesheet" href="lib/onsen/css/topcoat-mobile-onsen-ios7.css">  
  <link rel="stylesheet" href="styles/app.css"/>

  <script src="lib/onsen/js/angular/angular.js"></script>    
  <script src="lib/onsen/js/onsenui.js"></script>    
  <script src="js/app.js"></script>  
  <script src="controller.js"></script> 
  <script src="data.js"></script> 
  <script src="master.js"></script> 
  <script src="detail.js"></script> 
</head>

<body>    
  <ons-screen>
    <ons-navigator title="Page 1">
      <ons-page class="center">
        <div ng-controller="MasterController">
          <ons-list>
                <ons-list-item
                  class="topcoat-list__item--tappable topcoat-list__item__line-height" 
                  ng-repeat="item in items" 
                  ng-click="showDetail($index)">
                  <ons-row>
                    <ons-col size="10"> 
                      <ons-icon 
                          icon="{{item.icon}}"
                          fixed-width="true">
                      </ons-icon>
                    </ons-col>
                    <ons-col class="left">
                      {{item.title}}
                    </ons-col>
                  </ons-row>                          
                </ons-list-item>
            </ons-list>
        </div>    
      </ons-page>
    </ons-navigator>
  </ons-screen>
</body>  
</html>

这是js文件

 var myApp = angular.module('myApp');

    myApp.factory('Data', function(){
        var data = {};

        data.items = [
            { 
                title: 'aducational',
                icon: 'comments-o',
                description: 'Item 1 Description',
                href: 'tp.html'
            },
            { 
                title: 'dance',
                icon: 'desktop',
                description: 'Item 2 Description',
                href: 'dance.html'
            },
            { 
                title: 'singing',
                icon: 'heart-o',
                description: 'Item 3 Description',
                href: 'tp.html'
            }
        ]; 

        return data;
    });

我无法到达 dance.html,其中 tp.html 工作正常。当我将舞蹈更改为 tp 时,它工作正常。一旦我点击舞蹈,之后我也无法获得 tp :(。我的 dance.html 工作的地方适当地单独

4

0 回答 0