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;
    });

私はtp.htmlが正常に機能しているdance.htmlに到達できません.danceをtpに変更すると、正しく機能します.その後danceをクリックすると、tpも取得できません:(.where my dance.html working一人で適当に

4

0 に答える 0