代码拉取完成,页面将自动刷新
安装nodejs,并设置环境变量,终端窗口输入
node --version
显示如下版本号即是安装成功
v6.2.2
安装gulp工具,终端窗口输入如下命令执行安装
npm install gulp -g
终端窗口输入
gulp --version
显示如下版本号即是安装成功
[11:17:15] CLI version 3.9.1
[11:17:15] Local version 3.9.1
gulp serve
gulp build
编译好的代码将保存在dist目录下
.tmp
(临时文件) - 临时文件.bower_components
(第三方依赖库) - 第三方依赖库src
(开发目录) - 项目源代码:
app
() - app源代码
components
(组件) - directivelogin
(登录模块) - 登录页面和控制器machinecode
(机器码模块) - 机器码页面和控制器main
(首页) - 首页和控制器other
(404模块) - 404页面和控制器playcode
(播放码模块) - 我的播放码页面和控制器register
(注册模块) - 注册页面和控制器uploadcode
(机器码上传模块) - 机器码上传页面和控制器index.config.js
() - app配置index.constants.js
() - app常量index.module.js
() - 模块定义index.route.js
() - 路由配置index.run.js
() - main函数,只运行一次index.scss
() - app样式scss源代码index.service.js
() - 与服务端的数据交互(rest)assets
(静态资源) - 图片、文件等
images
() - app图片ZeroClipboard.swf
() - flash播放文件 .state('machinecode',{
url:'/machinecode',
templateUrl:'app/machinecode/machinecode.html',
controller:'MachineCodeController',
controllerAs: 'machinecode'
})
bower install --save <第三方依赖库名称>
function myInterceptor($rootScope, $q,client,MyAuth){
return {
'request':function(config){
config.headers['Content-Type'] = 'application/json';
config.headers['source'] = '' + client.source;
config.headers['token'] = '' + (MyAuth.loggedIn() || '');
if(config.data){
config.data.head = {source:client.source,token:MyAuth.loggedIn() || ''}
}
return config;
},
'requestError':function(rejection){
return $q.reject(rejection);
},
'response':function(response){
if(response.status == 401 || response.status === 403) {
$rootScope.$broadcast('event:auth-require',response);
return $q.reject(response);
}else{
if(response.head && response.head.errorCode == '401'){
return $q.reject(response.head);
}
return response;
}
},
'responseError':function(rejection){
if(rejection.status === 401 || rejection.status === 403){
$rootScope.$broadcast('event:auth-require',rejection);
}else{
return $q.reject(rejection);
}
}
};
}
nodejs
(开发构建环境) - 开发环境必备,提供丰富的开发工具库,提升开发流程效率.gulp
(任务管理) - 基于流的任务调度管理.angular
(mvvm框架) - 分层.angular-ui-router
(路由控制) - 通过hash变化控制前端页面交互逻辑.bootstrap-sass
(bootstrap栅格sass源码) - 提供响应式栅格化布局、组件样式、元素样式等.angular-bootstrap
(集成angular方式的bootstrap工具) - 提供table、弹窗、菜单、个性化tab等丰富的UI组件库.angular-toastr
(toast组件) - tip|alert|confirm|dialog.ngstorage
(本地存储) - 本地存储.zeroclipboard
(复制函数) - 基于flash的复制功能函数(IOS上不支持).此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。