无法找到指令'ngSwitch'所需的控制器'masonry'

时间:2015-10-28 01:46:02

标签: angularjs masonry

这是我的html:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Outbox</title>
    <!--link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css"-->
    <link rel="stylesheet" href="../DT/bootstrap.min.css">
    <!--link rel="stylesheet" type="text/css" href="../bootstrap-3.3.5-dist/css/bootstrap.min.css"-->
    <link rel="stylesheet" href="../DT/dataTables.bootstrap.css">
    <link rel="stylesheet" href="../DT/responsive.bootstrap.css">

</head>

<body>
<div class="container">


<nav class="navbar navbar-default">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#">Kokola Email Template</a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                <li><a href="email-setting.php">Home <span class="sr-only">(current)</span></a></li>
                <li><a href="set.php">Set Header Footer</a></li>
                <li class="active"><a href="outbox.php">Outbox</a></li>
                <li><a href="logout.php">Sign Out</a></li>
            </ul>

        </div><!-- /.navbar-collapse -->
    </div><!-- /.container-fluid -->
</nav>




<?php

if(isset($_POST[HAPUS]))
{  
  include "../koneksi.php";

  $idhe = $_POST[ID];

  $jumlah = count($idhe);

 // echo $jumlah;

  for($i=0;$i<=$jumlah;$i++)
  {
      //echo $idhe[$i]."<br>";  

      $sql = "DELETE FROM outbox WHERE ID = '$idhe[$i]'";

      //echo $sql;

      //$hasil = mysqli_query($mysqli, $sql);
      $hasil = mysql_query($sql);

  }//end for

  echo "<script>alert('Delete Berhasil dilakukan');</script>";



}

?>
<div class="center-block">
<form method="post" action="outbox.php">

<div style="margin-left:340px;margin-top:10px; margin-bottom:10px;"><!--a-- href="email-setting.php"><img src="back.png"/></a-->
&nbsp;&nbsp;<input type="submit" value="HAPUS" name="HAPUS" style="background-color:#F00;color:#FFF;border:0 none;
cursor:pointer;-webkit-border-radius: 5px;border-radius: 5px;padding:5px 15px;margin-left:420px;" /></div>


 <!-- style="font-family:Verdana, Geneva, sans-serif;" div style='overflow:auto;height:600px;width:700px;margin-left:300px;' style="font-family:Verdana, Geneva, sans-serif;font-size:12px;"-->
<table id="example" class="table table-striped table-bordered dt-responsive nowrap">
  <thead>
    <tr height="100">
    <td colspan="5" align="center"><h2>Outbox</h2></td>
  </tr>
  <tr height="50">
     <th align="center">Chek</th>
     <th align="center">Date Time</th>
     <th align="center">Tujuan</th>
     <th align="center">Subjek</th>
     <th align="center">Action</th>
  </tr>
  </thead>
  <tbody>
 <?php
 include "../koneksi.php";

 $sql = "SELECT * FROM outbox";

 //$hasil = mysqli_query($mysqli, $sql);
 $hasil = mysql_query($sql);

 while($data = mysql_fetch_array($hasil))
 { 

   echo "<tr height='50px'>";
     echo "<td align='center'><input type='checkbox' name='ID[]' value='$data[ID]'></td>";
     echo "<td width='100' align='center'>$data[tglwkt]</td>";
     echo "<td align='center'>$data[tujuan]</td>";
     echo "<td align='center'>$data[subjek]</td>";
     echo "<td align='center'><a href='detail.php?ID=$data[ID]'><input type='button' value='Detail' style='background:#F00;color:#FFF;'></a></td>";

   echo "</tr>";

 }


 ?>
  </tbody>


</table>
<!--/div-->
</form>
   </div><!--center-blcok-->

</div><!--end container-->



<!--script-- src="../bootstrap-3.3.5-dist/js/jquery.min.js"></script-->
<script src="../DT/jquery-1.11.2.min.js"></script>
<!--script src="../DT/jquery-1.11.3.min.js"></script-->
<!--script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script-->
<script src="../DT/bootstrap.min.js"></script>
<script src="../DT/jquery.dataTables.js"></script>
<script src="../DT/dataTables.bootstrap.js"></script>
<script src="../DT/dataTables.responsive.js"></script>

<script>
    $(document).ready(function() {
        $('#example').DataTable();
    } );
</script>

</body>
</html>

以下是实际的错误文字:

<div masonry id="graphicGridDiv">
    <div class="masonry-brick" ng-switch on="{{graphic.length}}" ng-repeat="graphic in graphicArray">

        <div ng-switch-when="1" class="col-sm-4 gra-mix-graphic ">
            <div class="category_1 custom-menu-preview mix" ng-click="singleGraContent(graphic[0].id)">
                <p class="video_title" title="title" ng-bind="$parent.graphic[0].name"></p>

                <div class="gra-mix-inner">
                    <img ng-src="{{$parent.graphic[0].src}}" class="img-responsive">
                </div>
                <div class="caption">
                    <p class="video_detail" title="digest" ng-bind="$parent.graphic[0].digest"></p>
                </div>
                <div class="gra-mix-details-t">
                    <a class="mix-link but" title="delete" ng-click="graDelete($parent.graphic[0].id)">
                        <i class="fa fa-times"></i>
                    </a>
                    <a class="mix-preview but fancybox-button" title="edit" ng-click="graEdit(graphic[0])" >
                        <i class="fa fa-pencil"></i>
                    </a>
                </div>
            </div>
        </div>
        <div ng-switch-default class="col-sm-4 gra-mix-graphic">
            <div class="gra-mix-details-t">
                <a class="mix-link" title="delete" ng-click="graDelete(id)">
                    <i class="fa fa-times"></i>
                </a>
                <a class="gra-mix-preview fancybox-button" ng-click="graEdit(id)" title="edit**strong text**" data-rel="fancybox-button">
                    <i class="fa fa-pencil"></i>
                </a>
            </div>
            <div class="category_1 custom-menu-preview" ng-click="multiGraContent(id)">
                <div class="gra-mix-inner thumbnail">
                    <img ng-src="{{graphic[0].src}}" class="img-responsive" style="width: 330px;">

                </div>
                <div class="multiFirstTitle">
                    <p class="video_sub_title"  title="{{graphic[0].name}}" ng-bind="graphic[0].name"></p>
                </div>
                <div class="multi" ng-repeat="mutiGra in graphic | arrayLimitFilter:1 ">
                    <p title="{{mutiGra.name}}" ng-bind="mutiGra.name" class="video_artical_title"></p>

                    <div class="multiImage" id="multiImageDiv">
                        <img ng-src="{{mutiGra.src}}" class="multiImage">
                    </div>
                </div>
            </div>
        </div>
    </div>

</div>
     

ng-repeat =“graphicArray中的图形”&gt;

1 个答案:

答案 0 :(得分:0)

ng-controller未在HTML中的任何位置指定。假设您的控制器名为砌体,则需要添加ng-controller =&#34;砌体&#34;你的外部div。