PhoneGap中文网

 找回密码
 立即注册
查看: 10857|回复: 0
打印 上一主题 下一主题

Error: [ng:areq] Argument 'syController' is not a function, got undefined

[复制链接]

43

主题

64

帖子

265

积分

中级会员

Rank: 3Rank: 3

积分
265
跳转到指定楼层
楼主
发表于 2016-4-20 09:57:46 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
路由的首页定义了controller,如下
.state('tab.sy', {
    url: '/sy',
    views:{
        'tab-sy':{
            templateUrl: "tabs/tab-sy.html",
            controller:'syController'
        }

    }

  })
首页代码:<ion-view view-title="个人中心">
  <ion-header-bar class="bar-assertive">
    <h1 class="title">个人中心</h1>
  </ion-header-bar>


  <ion-content>
      <a href="#/ztyxDet">Tab1</a>
      {{title}}
  </ion-content>
</ion-view>
在首页点击进入子页面,子页面中也定义了一个controller;运行就报错Error: [ng:areq] Argument 'syController' is not a function, got undefined

子页面代码:
<div ng-controller="ztyxDetailController" class="ztyxDetail">
      <div class="bar bar-header bar-assertive">
          <div class="button icon ion-ios-arrow-left"></div>
              <h1 class="title">主题游戏</h1>
          <div class="button icon ion-share" ng-click="show();"></div>
      </div>

      <div class="scroll-content has-header">
        <ul class="list list-detail">
          <li class="item item-thumbnail-left item-ztyx-detail">
            <img src="sy/imgs/yy.jpg" class="image">
            <div class="game">秦时明月</div>
            <div class="abstract">指点江山定四海沉浮苍生与你指尖苍生与你指尖</div>
            <div class="time">2016/01/10-2016/04/08</div>
              <a class="button button-assertive buttonSelf">开始游戏</a>
          </li>
        </ul>

        <div class="picture_sholder">
          <ion-scroll direction="x">
            <img ng-src="{{picture.face}}" ng-repeat="picture in pictures" class="images"></img>
          </ion-scroll>
        </div>

        <div style="padding:0 5px;">
          <h5>主题游戏介绍</h5>
          <p>2015年上映的一部由北京天河盛宴国际文化传媒有限公司、开得盛世(北京)投资管理公司、
          和云算(北京)网络科技有限公司联合投资拍摄。</p>
        </div>

        <div style="padding:0 5px;">
          <h5>参与细则说明</h5>
          <p>2015年上映的一部由北京天河盛宴国际文化传媒有限公司、开得盛世(北京)投资管理公司、
            和云算(北京)网络科技有限公司联合投资拍摄。</p>
        </div>

        <div style="padding:0 5px;">
          <h5>游戏奖励</h5>
          <p>一等奖:秦时明月抱枕(20名)<br>
             一等奖:秦时明月抱枕(20名)<br>
             一等奖:秦时明月抱枕(20名)</p>
        </div>
      </div>
    </div>
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

站长推荐 上一条 /1 下一条

ionic4视频教程

Archiver|手机版|小黑屋| PhoneGap中文网 ( 京ICP备13027796号-1 )  

GMT+8, 2024-5-20 20:23 , Processed in 0.041871 second(s), 27 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表