未添加AngularJS局部视图ng-scope类

时间:2015-11-15 21:25:53

标签: angularjs

以下是我使用的局部视图。不知何故,范围' class不会自动添加到每个HTML标记。有人能告诉我这可能是什么原因?我知道angular.js有条件地增加了课程,但我不知道如何解决这个问题。

<div class="my-photo-header">
    <div class="container">
        <a class="navbar-brand my-navbar-brand">
            <span class="glyphicon glyphicon-pencil"></span>
        </a>
        <form class="navbar-form my-navbar-form navbar-left" role="search">
            <div>
                <input id="photo-title" type="text" class="form-control" placeholder="Untitled"
                   title="Edit your photo title here." value="TITLE">
            </div>
        </form>
        <ul id="photo-title-header" class="nav nav-tabs">
            <li role="presentation" class="dropdown">
                <a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                    File <span class="caret"></span>
                </a>
                <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
                    <li>
                        <a>Save</a>
                    </li>
                    <li>
                        <a ng-click="vm.haha()">Upload</a>
                        <input type="file" upload-image="uploadImage"/>
                    </li>
                    <li><a>Open</a></li>
                    <li><a>Invite</a></li>
                    <li role="separator" class="divider"></li>
                    <li><a>Export as<span class="caret"></span></a></li>
                    <li><a>Print</a></li>
                </ul>
            </li>
            <!-- Please change TODO to display the number, and maybe change style to not be a tab -->
            <li role="listitem"><a>{{TODO}} revisions</a></li>
            <li><a href="#/login" class="btn btn-primary">Logout</a></li>
        </ul>
    </div>
</div>

0 个答案:

没有答案