阅读背景:

angular router ui 路由模块(父子)层级说明

来源:互联网 

 

路由配置页面

/***************** 英雄榜 ************************/
//英雄榜模板
.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) {

	}]
})/***************** 英雄榜 ***********



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: