压缩angularjs
This commit is contained in:
parent
b965698fdf
commit
793b651393
|
@ -31,3 +31,4 @@ vendor/cache
|
|||
/tags
|
||||
/config/initializers/gitlab_config.rb
|
||||
1234567
|
||||
public/javascripts/wechat/node_modules/
|
||||
|
|
|
@ -19,12 +19,8 @@
|
|||
<div ng-view>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="/javascripts/wechat/angular.js"></script>
|
||||
<script src="/javascripts/wechat/angular-route.js"></script>
|
||||
<script src="/javascripts/wechat/angular-sanitize.min.js"></script>
|
||||
<script src="/javascripts/wechat/angular-cookies.js"></script>
|
||||
<script src="/javascripts/jquery-1.3.2.js"></script>
|
||||
<script src="/javascripts/wechat/build/angular.all.min.js"></script>
|
||||
<script src="/javascripts/wechat/app.js"></script>
|
||||
</body>
|
||||
|
||||
|
|
|
@ -17,12 +17,8 @@
|
|||
<div ng-view>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="/javascripts/wechat/angular.js"></script>
|
||||
<script src="/javascripts/wechat/angular-route.js"></script>
|
||||
<script src="/javascripts/wechat/angular-sanitize.min.js"></script>
|
||||
<script src="/javascripts/wechat/angular-cookies.js"></script>
|
||||
<script src="/javascripts/jquery-1.3.2.js"></script>
|
||||
<script src="/javascripts/wechat/build/angular.all.min.js"></script>
|
||||
<script src="/javascripts/wechat/app.js"></script>
|
||||
</body>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ var debug = false; //调试标志,如果在本地请置为true
|
|||
|
||||
if(debug===true){
|
||||
//apiUrl = 'http://localhost:3000/api/v1/';
|
||||
apiUrl = 'https://www.trustie.net/api/v1/';
|
||||
apiUrl = 'http://www.trustie.net/api/v1/';
|
||||
}
|
||||
|
||||
|
||||
|
@ -16,7 +16,7 @@ app.factory('auth', function($http,$routeParams, $cookies, $q){
|
|||
}
|
||||
|
||||
if(debug===true){
|
||||
_openid = "1";
|
||||
_openid = "orgVLv8TlS6e7FDiI6xdTGHRaaRo"; //guange的帐号
|
||||
}
|
||||
|
||||
var getOpenId = function() {
|
||||
|
@ -478,24 +478,13 @@ app.directive('inputAuto',function(){
|
|||
}
|
||||
});
|
||||
|
||||
app.directive('loadingSpinner', function ($http) {
|
||||
app.directive('loadingSpinner', ['$http', function ($http) {
|
||||
return {
|
||||
restrict: 'A',
|
||||
replace: true,
|
||||
template: '<div class="loading-bg"><div class="loading-box"><img src="/images/loading.gif" alt=""/><span>加载中...</span></div></div>',
|
||||
link: function (scope, element, attrs) {
|
||||
|
||||
scope.$watch('activeCalls', function (newVal, oldVal) {
|
||||
if (newVal == 0) {
|
||||
$(element).hide();
|
||||
}
|
||||
else {
|
||||
$(element).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
template: '<div ng-show="activeCalls>0" class="loading-bg"><div class="loading-box"><img src="/images/loading.gif" alt=""/><span>加载中...</span></div></div>',
|
||||
};
|
||||
});
|
||||
}]);
|
||||
|
||||
app.config(['$routeProvider',"$httpProvider", "$locationProvider",function ($routeProvider, $httpProvider, $locationProvider) {
|
||||
var rootPath = '/assets/wechat/'
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,10 @@
|
|||
var gulp = require('gulp'),
|
||||
uglify = require('gulp-uglify');
|
||||
var concat = require('gulp-concat');
|
||||
|
||||
gulp.task('minify', function () {
|
||||
gulp.src(['angular.js', 'angular-route.js', 'angular-cookies.js', 'angular-sanitize.min.js'])
|
||||
.pipe(uglify())
|
||||
.pipe(concat('angular.all.min.js'))
|
||||
.pipe(gulp.dest('build'))
|
||||
});
|
Loading…
Reference in New Issue