Take off

블로그 이미지
by 안.들
  • Total hit
  • Today hit
  • Yesterday hit

'web'에 해당되는 글 3건

  1. 2016.07.08
    angularjs 로 현재 메뉴에 avtive 상태 표기하기
  2. 2015.12.13
    Test : SyntaxHighlighter 3.0.83
  3. 2015.12.12
    highlight.js 테스트

angularjs 로 현재 메뉴에 avtive 상태 표기하기



대분류 메뉴 아래 dropdown 메뉴의 class='active' 시켜본다.


<li class="dropdown active">

                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">MEN <i class="fa fa-angle-down"></i></a>

                            <ul class="dropdown-menu">

                                <li><a is-active-nav href="productListM.html#MAP1">Tees</a></li>

                                <li><a is-active-nav href="productListM.html#MAP2">Shirts</a></li>

                                <li><a is-active-nav href="productListM.html#MAP3">Sweaters & Sweatshirts</a></li>

                                <li><a is-active-nav href="productListM.html#MAP4">Bottoms</a></li>

                                <li><a is-active-nav href="productListM.html#MAP5">OuterWear</a></li>

                                <li><a href="404.html">*sample404</a></li>

                            </ul>

                        </li>




스크립트)


app.directive('isActiveNav', ['$location', function ($location) {

    return {

        restrict: 'A',

        link: function (scope, element) {

            scope.location = $location;

            scope.$watch('location.path()', function (currentPath) {

                

                if (currentPath == element[0].hash.replace("#", "/")) {

                    element.parent().addClass('active');

                } else {

                    element.parent().removeClass('active');

                }

            });

        }

    };

}]);



angular.module 은 한 page에 일단 하나만 하도록.

html tag에 

<html lang="en" ng-app="myApp">



출처) http://blog.bastisteiner.com/entry/add-active-to-menu-with-angularjs


'web' 카테고리의 다른 글

Test : SyntaxHighlighter 3.0.83  (0) 2015.12.13
highlight.js 테스트  (0) 2015.12.12
AND
class HellowJava
{
    public static void main(String[] args)
    {
        System.out.println("link url ");
        System.out.println("http://alexgorbatchev.com/SyntaxHighlighter/manual/configuration/");
        System.out.println("참조, http://blueray21.tistory.com/m/post/30");
    }
}
class HellowJava
{
    public static void main(String[] args)
    {
        System.out.println("unlink url ");
        System.out.println("http://audiodot.com");
    System.out.println("http://doitforyou.co.kr");
    }
}


'web' 카테고리의 다른 글

angularjs 로 현재 메뉴에 avtive 상태 표기하기  (0) 2016.07.08
highlight.js 테스트  (0) 2015.12.12
AND

HTML/CSS편집 메뉴에서 

highlight.pack.js 
tomorrow-night-bright.css 파일 업로드 후 
 html에 js, css추가
		
<link rel="stylesheet" href="./images/tomorrow-night-bright.css" />
		<!--
	업로드한 코어 파일(highlight.pack.js)을 불러옵니다.
	이 스크립트는 Highlight.js 라이브러리를 사용하기 위해 필수적입니다.
-->
<script src="./images/highlight.pack.js"></script>
<!--
	페이지가 로드될 때 강조를 적용하기 위해 필요한 코드입니다.
-->
<script>hljs.initHighlightingOnLoad();</script>
Highlight적용위해
아래 테그 작성
<pre><code class="html"> 적용할 html tag적어주세요</code></pre>


참고) https://highlightjs.org/usage/


'web' 카테고리의 다른 글

angularjs 로 현재 메뉴에 avtive 상태 표기하기  (0) 2016.07.08
Test : SyntaxHighlighter 3.0.83  (0) 2015.12.13
AND

ARTICLE CATEGORY

분류 전체보기 (66)
금융 (0)
관제 (4)
Unix (1)
Android (6)
Windows (2)
Java (4)
oracle (3)
web (3)
English (3)
Physics (1)
Books (6)
요리 (1)
Deep Learning (6)
IoT (21)
to-do list (0)
Music (1)

RECENT ARTICLE

RECENT COMMENT

CALENDAR

«   2025/05   »
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

ARCHIVE