0

仿照百度的这个页面制作右上角的工具栏,点击切换工具栏的子菜单,html代码如下:

                               <div class="tool-wrap">
                                <div class="boxopt" ng-click="box">
                                     <span id="util_control"></span>
                                     <i class="boxtext">工具</i>
                                     <em></em>
                                 </div>
                             
                                <div class="detail-box" ng-if="toolFlag" >
                                    <ul class="boxinfo">
                                        <li class="map-measure">
                                            <sapn class="last measure">
                                            </sapn>
                                            <i>
                                                测距
                                            </i>
                                        </li>
                                        <li class="map-mark">
                                            <sapn class="last mak">
                                            </sapn>
                                            <i>
                                                标记
                                            </i>
                                        </li>
                                    </ul>
                                </div>

js代码如下:

$scope.toolFlag = false;
        $scope.box = function() {
            $scope.toolFlag = true;
            console.log("ssss");
        }

但是根本就不触发怎么回事???

1个回答

0

已采纳

ng-click="box()" ??

撰写答案