index.html 1.95 KB
<!DOCTYPE html>
<html ng-app="myApp">
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <link rel="stylesheet" href="../dist/base.css" >
    <!--引入基本的js-->
    <script src="http://cdn.xiniunet.com/js/jquery/1.7.2/jquery.min.js"></script>
    <script src="http://cdn.xiniunet.com/js/angular/1.3.9/angular.min.js"></script>
    <script src="http://cdn.xiniunet.com/js/bootstraptpls/0.12.1/bootstraptpls.min.js"></script>
    <!--引入指令的css样式和js文件-->
    <script src="/xn-derictives/src/main/webapp/home/xn-directive-common/directive/commons.js"></script>
    <link rel="stylesheet" href="/xn-derictives/src/main/webapp/home/xn-directive-common/directive/style.css" >
    <!--引入图标文件-->
    <link rel="stylesheet" href="/xn-derictives/src/main/webapp/other/xn-icon-common/iconfont.css" >
</head>
<body>
<div class="xn-header" ng-controller="MyController">
    <div class="xn-width auto">
        <div class="header-box clearfix">
            <div class="f-left">欢迎你,晚秋</div>
            <div  header-info-center  icon-base-url="$config.getImgUrl('')"
            data-about-url="$homeLink.setTarget('about')"
            data-index-url="$homeLink.setTarget('index')"
            default-show="defaultShow"
            class="clearfix">
        </div>
     </div>
   </div>
</div>
</body>
</html>

<script>
    /*这个是相关路径的配置文件,在具体项目中都有请注意*/
    var xnConfig = {
        myUrl: "http://local.xiniunet.com/"
    };
    angular.module("myApp", ["ui.bootstrap","xn.directive.common"])
            .controller("MyController", ["$scope", function($scope) {
                /*控制手机APP,云盘,客服这个三个按钮是否显示,设置为false不显示*/
              $scope.defaultShow={
                /*  isShowApp:false,
                  isShowYun:false,
                  isShowCustomer:false*/
              }
            }])
         .value("xnConfig",xnConfig);
</script>