今天把项目需要的前端js 都放到工程的lib下并提交到git工程中。
基于ui-rout编写了一个简单的单页面跳转的demo,html和对应的js都在工程app下
访问入口是http://localhost:8000/app/main.html
目前还没有设置主页面,还不清楚如何设置,暂时以html方式访问
ui-sref的使用方法
对于ui-rout的设置在demoApp.js中有设置,需要关注的是state
.state(“index.page1”, {
url:”/page1”,
templateUrl: “html/demo/page1.html”
index.page1的点意思是在index的下一级访问目录下增加/page1,映射的路径是templateUrl
page1
通过ui-sref指定state,这样就会更新当前页面的
AngularJS的demo项目已经搭建好了,接下来需要做的是基于Bootstrap,搭建一个demo工程,使用angluarJS+Bootstrap把前端工程搭建起来。