talk.js
1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
(function () {
"use strict";
var ref = [
"ui.router",
"xn.common",
// "xn.directive.navigation",
"xn.service.interceptor",
// "xn.service.foundation",
"xn.talk.filter",
"xn.talk.service",
"xn.talk.method",
"ui.bootstrap",
"xn.directive.form",
"xn.directive.calendar",
"xn.directive.location"
];
var app = angular.module("myApp", ref);
app.value("xnConfig",{
isDev:require('electron').remote.getGlobal('isDev'),
platform:require('electron').remote.getGlobal('platform'),
appInfo:require('electron').remote.getGlobal('appInfo')
});
//拦截器
app.config(["$httpProvider", function ($httpProvider) {
$httpProvider.interceptors.push("httpInterceptor");
}]);
// 全局配置 form提交验证
app.config(["xnValidatorProvider", function (xnValidatorProvider) {
// 全局配置
xnValidatorProvider.config({
blurTrig: false,
showError: false,
removeError: false
});
xnValidatorProvider.setRules({});
}]);
})();