Java之品优购课程讲义_day08(3)

1 广告类目选择
将 contentCategoryService 引入 contentController 在 content.html 引入 contentCategoryService.js 在 contentController.js 中添加代码

//加载广告分类列表

$scope.findContentCategoryList=function(){ contentCategoryService.findAll().success(
function(response){

$scope.contentCategoryList=response;

}

);

}
在 content.html 初始化调用此方法
<
body
class="hold-transition
skin-red
sidebar-mini"
ng-app="pinyougou"

ng-controller="contentController"  ng-init="findContentCategoryList()">

2.1.1 广告状态
修改 content.html
Java之品优购课程讲义_day08(3)
网站首页-广告展示
3.1 需求分析
修改首页,当其轮播广告图根据后台设置的广告列表动态产生。
3.2 准备工作
3.2.1 工程搭建
创建 war 模块 pinyougou-portal-web ,此工程为网站前台的入口,参照其它 war 模块编写配置文件。不需要添加 SpringSecurity 框架
Java之品优购课程讲义_day08(3)
pom.xml 中配置 tomcat 启动端口为 9103
3.1.1 前端
(1)拷贝资源:资源文件夹中 “前台页面”目录下的 index.html 以及相关目录拷贝到
pinyougou-portal-web
Java之品优购课程讲义_day08(3)
(2)添加 angularJS 库
Java之品优购课程讲义_day08(3)

猜你喜欢

转载自blog.51cto.com/13517854/2170025