将html页面链接到html页面

时间:2014-07-03 12:29:40

标签: html angularjs onsen-ui

     <!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 :(。我的舞蹈.html独自工作

0 个答案:

没有答案