angular router ui 루트 모듈(부자) 등급 설명

4412 단어

라우팅 구성 페이지
/*****************   ************************/
// 
.state('heroTopList', {
	url: '/heroTopList',
	abstract:true,
	templateUrl: 'templates/heroTopIndex.html',
	// 
	onEnter: function () {
	},
	// 
	onExit: function () {
	},
	controller: ["$scope", "$state", function ($scope, $state) {
		$scope.tabChange = function(myevent){
			var currentObj = $(myevent.target);
			currentObj.closest(".yingxiongbang").find("a.button").removeClass("active");
			currentObj.addClass("active");
		};
	}]
})
//top10 
.state('heroTopList.topShop', {
	url: '/heroTopList/topShop',
	templateUrl: 'templates/heroTopIndex_topShop.html',
	// 
	onEnter: function () {
	},
	// 
	onExit: function () {
	},
	controller: ["$scope", "$state", function ($scope, $state) {

	}]
})
//top10 
.state('heroTopList.topSuperMember', {
	url: '/heroTopList/topSuperMember',
	templateUrl: 'templates/heroTopIndex_topSuperMember.html',
	// 
	onEnter: function () {
	},
	// 
	onExit: function () {
	},
	controller: ["$scope", "$state", function ($scope, $state) {

	}]
})
//top10  
.state('heroTopList.topMember', {
	url: '/heroTopList/topMember',
	templateUrl: 'templates/heroTopIndex_topMember.html',
	// 
	onEnter: function () {
	},
	// 
	onExit: function () {
	},
	controller: ["$scope", "$state", function ($scope, $state) {

	}]
})

 
 
heroTopIndex.html 템플릿 페이지 내용
<ion-header-bar align-title="center">
     <div class="buttons">
         <a class="button button-clear" ui-sref="index">
            <span class="icon ion-ios-arrow-left"></span>
         </a>
     </div>
     <h1 class="title">
          
     </h1>
</ion-header-bar>
<style>
    .yingxiongbang a.active{
        background-color: #000;
        color: #fff;
    }
</style>
<ion-content class="">
    <div class="button-bar yingxiongbang">
        <a class="button bg_e3e2e2 active" ui-sref="heroTopList.topShop" ng-click="tabChange($event)"> </a>
        <a class="button bg_e3e2e2" ui-sref="heroTopList.topMember" ng-click="tabChange($event)"> </a>
        <a class="button bg_e3e2e2" ui-sref="heroTopList.topSuperMember" ng-click="tabChange($event)"> </a>
    </div>
    <div ui-view></div>
</ion-content>

 
 
heroTopIndex_topMember.html 페이지 내용
<style>
    .list .item.item-avatar{
        min-height: 70px;
        padding-top:14px;
        padding-bottom: 14px;
    }
</style>

<div class="list">
    <div class="item item-avatar">
        <img src="public/image/touxiang.png">
        <div class="line_height_35px font_16">
            <div class="float_left"> </div>
            <div class="float_right">¥222222.22</div>
            <div class="clear_both"></div>
        </div>
    </div>

    <div class="item item-avatar">
        <img src="public/image/touxiang.png">
        <div class="line_height_35px font_16">
            <div class="float_left"> </div>
            <div class="float_right">¥222222.22</div>
            <div class="clear_both"></div>
        </div>
    </div>
</div>

 
 
 
 
 
 

좋은 웹페이지 즐겨찾기