module.exports = {
"env": {
"browser": true,
"commonjs": true,
"es6": true
},
"extends": "eslint:recommended",
"parserOptions": {
"sourceType": "module"
},
"globals": {
"angular": true// angular关键词
},
"parser": "babel-eslint", // 解析es7
"rules": {
"no-console": 0,
"quotes": [
"error",
"single"
]
}
};
import 'babel-polyfill';
import angular from 'angular';
import uiRouter from 'angular-ui-router';
import components from './components';
import services from './server'
import commonComponents from './commonComponents';
import appRouter from './config/app.router';
import './css/main.less';
import style from './app.less';
let appComponent = {
restrict: 'E',
template: require('./app.html'),
controller: function () {
this.class = style;
},
controllerAs: 'app'
};
export default angular.module('sass', [uiRouter, components, services, commonComponents])
.config(appRouter)
.component('app', appComponent)
.name;
import loginCtrl from './login'
import tem from './login.html';
export default angular.module('login', [])
.component('login', {
template: tem,
controller: loginCtrl
})
.name;
import url from '../../config/system.js';
class loginCtrl {
static $inject = ['http'];
constructor(http) {
[this.http, this.name] = [http, `login`];
this.str = `str${this.name}`;
}
login() {
this.http.get({userName: 'link', userPassword: '123456'}, url.login, (data) => {
console.info("success!")
});
}
}
export default loginCtrl;
import login from './login';
import register from './register';
export default angular.module('components', [
login,
register
]).name;
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有