如何将“ v”符号更改为“ +”(不折叠时)或“-”(折叠时)

时间:2018-11-06 15:31:31

标签: html css angularjs twitter-bootstrap

如何将“ v”符号更改为“ +”(未折​​叠时)或“-”(折叠时)。在这里一切正常。我只是想将插入符号更改为+或-

下面是我的代码。我用过boostrap,angular和html

角度控制器

myApp.controller('myController', myController);
myController.$inject = ['$scope'];
function myController($scope, $http) {
    // Controller business operation   
}

角度指令

(function () {
    'use strict';

    angular.module('myApp')
     .directive('myDirective', function () {
         return {
             restrict: 'E', //E = element, A = attribute, C = class, M = comment         
             scope: true,
             templateUrl: 'Views/Directives/Ecommerce/template.html',
             controller: myController,
             controllerAs: 'vm'
         }
     });

})();

Angular Directive HTML代码

<nav id="navbar" class="navbar navbar-default" role="navigation">
    <div class="container">
        <div class="navbar-inner">
            <div class="navbar-collapse collapse">
                <ul class="nav navbar-nav navbar-left">
                    <li><a href="#">Home</a></li>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Services <i class="fa fa-angle-down"></i></a>
                        <ul class="dropdown-menu">
                            <li class="menu-item dropdown dropdown-submenu">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">Cosmetic Dentistry <i class="fa fa-angle-right"></i></a>
                                <ul class="dropdown-menu">
                                    <li class="menu-item"><a href="#">Dental Hygiene</a></li>
                                    <li class="menu-item"><a href="#">Crowns & Bridges</a></li>
                                    <li class="menu-item"><a href="#">Dentures</a></li>
                                </ul>
                            </li>
                            <li class="menu-item dropdown dropdown-submenu">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">General Dentistry <i class="fa fa-angle-right"></i></a>
                                <ul class="dropdown-menu">
                                    <li class="menu-item"><a href="#">Dental Hygiene</a></li>
                                    <li class="menu-item"><a href="#">Crowns & Bridges</a></li>
                                    <li class="menu-item"><a href="#">Dentures</a></li>
                                </ul>
                            </li>
                            <li class="menu-item dropdown dropdown-submenu">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">Braces <i class="fa fa-angle-right"></i></a>
                                <ul class="dropdown-menu">
                                    <li class="menu-item"><a href="#">Dental Hygiene</a></li>
                                    <li class="menu-item"><a href="#">Crowns & Bridges</a></li>
                                    <li class="menu-item"><a href="#">Dentures</a></li>
                                </ul>
                            </li>
                            <li class="menu-item dropdown dropdown-submenu">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">Implants <i class="fa fa-angle-right"></i></a>
                                <ul class="dropdown-menu">
                                    <li class="menu-item"><a href="#">Dental Hygiene</a></li>
                                    <li class="menu-item"><a href="#">Crowns & Bridges</a></li>
                                    <li class="menu-item"><a href="#">Dentures</a></li>
                                </ul>
                            </li>
                            <li class="menu-item"><a href="#">Nervous Patients Care</a></li>
                        </ul>
                    </li>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Team <i class="fa fa-angle-down"></i></a>
                        <ul class="dropdown-menu">
                            <li class="menu-item dropdown dropdown-submenu">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">Cosmetic Dentistry <i class="fa fa-angle-right"></i></a>
                                <ul class="dropdown-menu">
                                    <li class="menu-item"><a href="#">Dental Hygiene</a></li>
                                    <li class="menu-item"><a href="#">Crowns & Bridges</a></li>
                                    <li class="menu-item"><a href="#">Dentures</a></li>
                                </ul>
                            </li>
                            <li class="menu-item dropdown dropdown-submenu">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">General Dentistry <i class="fa fa-angle-right"></i></a>
                                <ul class="dropdown-menu">
                                    <li class="menu-item"><a href="#">Dental Hygiene</a></li>
                                    <li class="menu-item"><a href="#">Crowns & Bridges</a></li>
                                    <li class="menu-item"><a href="#">Dentures</a></li>
                                </ul>
                            </li>
                            <li class="menu-item dropdown dropdown-submenu">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">Braces <i class="fa fa-angle-right"></i></a>
                                <ul class="dropdown-menu">
                                    <li class="menu-item"><a href="#">Dental Hygiene</a></li>
                                    <li class="menu-item"><a href="#">Crowns & Bridges</a></li>
                                    <li class="menu-item"><a href="#">Dentures</a></li>
                                </ul>
                            </li>
                            <li class="menu-item dropdown dropdown-submenu">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">Implants <i class="fa fa-angle-right"></i></a>
                                <ul class="dropdown-menu">
                                    <li class="menu-item"><a href="#">Dental Hygiene</a></li>
                                    <li class="menu-item"><a href="#">Crowns & Bridges</a></li>
                                    <li class="menu-item"><a href="#">Dentures</a></li>
                                </ul>
                            </li>
                            <li class="menu-item"><a href="#">Nervous Patients Care</a></li>
                        </ul>
                    </li>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Offers/Fees <i class="fa fa-angle-down"></i></a>
                        <ul class="dropdown-menu">
                            <li class="menu-item dropdown dropdown-submenu">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">Cosmetic Dentistry <i class="fa fa-angle-right"></i></a>
                                <ul class="dropdown-menu">
                                    <li class="menu-item"><a href="#">Dental Hygiene</a></li>
                                    <li class="menu-item"><a href="#">Crowns & Bridges</a></li>
                                    <li class="menu-item"><a href="#">Dentures</a></li>
                                </ul>
                            </li>
                            <li class="menu-item dropdown dropdown-submenu">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">General Dentistry <i class="fa fa-angle-right"></i></a>
                                <ul class="dropdown-menu">
                                    <li class="menu-item"><a href="#">Dental Hygiene</a></li>
                                    <li class="menu-item"><a href="#">Crowns & Bridges</a></li>
                                    <li class="menu-item"><a href="#">Dentures</a></li>
                                </ul>
                            </li>
                            <li class="menu-item dropdown dropdown-submenu">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">Braces <i class="fa fa-angle-right"></i></a>
                                <ul class="dropdown-menu">
                                    <li class="menu-item"><a href="#">Dental Hygiene</a></li>
                                    <li class="menu-item"><a href="#">Crowns & Bridges</a></li>
                                    <li class="menu-item"><a href="#">Dentures</a></li>
                                </ul>
                            </li>
                            <li class="menu-item dropdown dropdown-submenu">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">Implants <i class="fa fa-angle-right"></i></a>
                                <ul class="dropdown-menu">
                                    <li class="menu-item"><a href="#">Dental Hygiene</a></li>
                                    <li class="menu-item"><a href="#">Crowns & Bridges</a></li>
                                    <li class="menu-item"><a href="#">Dentures</a></li>
                                </ul>
                            </li>
                            <li class="menu-item"><a href="#">Nervous Patients Care</a></li>
                        </ul>
                    </li>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Patients <i class="fa fa-angle-down"></i></a>
                        <ul class="dropdown-menu">
                            <li class="menu-item dropdown dropdown-submenu">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">Cosmetic Dentistry <i class="fa fa-angle-right"></i></a>
                                <ul class="dropdown-menu">
                                    <li class="menu-item"><a href="#">Dental Hygiene</a></li>
                                    <li class="menu-item"><a href="#">Crowns & Bridges</a></li>
                                    <li class="menu-item"><a href="#">Dentures</a></li>
                                </ul>
                            </li>
                            <li class="menu-item dropdown dropdown-submenu">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">General Dentistry <i class="fa fa-angle-right"></i></a>
                                <ul class="dropdown-menu">
                                    <li class="menu-item"><a href="#">Dental Hygiene</a></li>
                                    <li class="menu-item"><a href="#">Crowns & Bridges</a></li>
                                    <li class="menu-item"><a href="#">Dentures</a></li>
                                </ul>
                            </li>
                            <li class="menu-item dropdown dropdown-submenu">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">Braces <i class="fa fa-angle-right"></i></a>
                                <ul class="dropdown-menu">
                                    <li class="menu-item"><a href="#">Dental Hygiene</a></li>
                                    <li class="menu-item"><a href="#">Crowns & Bridges</a></li>
                                    <li class="menu-item"><a href="#">Dentures</a></li>
                                </ul>
                            </li>
                            <li class="menu-item dropdown dropdown-submenu">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">Implants <i class="fa fa-angle-right"></i></a>
                                <ul class="dropdown-menu">
                                    <li class="menu-item"><a href="#">Dental Hygiene</a></li>
                                    <li class="menu-item"><a href="#">Crowns & Bridges</a></li>
                                    <li class="menu-item"><a href="#">Dentures</a></li>
                                </ul>
                            </li>
                            <li class="menu-item"><a href="#">Nervous Patients Care</a></li>
                        </ul>
                    </li>
                    <li><a href="#">Blog</a></li>
                    <li><a href="#">Referrals</a></li>
                    <li><a href="#">Contact</a></li>
                </ul>
            </div>
        </div><!-- end navbar-inner -->
    </div><!-- end container -->
</nav><!-- end navbar -->

调用指令的html主页

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <link href='//netdna.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css' rel='stylesheet' />
    <script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
    <script src="scripts/angular.min.js"></script>
    <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
    <!-- Optional theme -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
    <!-- Latest compiled and minified JavaScript -->
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
    <link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrapcss" />

    <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>


    <script src="Views/Config/app.module.js"></script>
    <script src="Views/Directives/Ecommerce/controller.js"></script>
    <script src="Views/Directives/Ecommerce/directive.js"></script>
    <link rel="stylesheet" href="Content/EcommerceStyleSheet.css" type="text/css" />
</head>

<body ng-app="myApp">
    <my-Directive></my-Directive>
</body>
</html>

在同一周的任何地方,对于带有+和-的jquery,是否带有jquery?

0 个答案:

没有答案