client app.js eslinted
This commit is contained in:
1 parent
997923a3d8
commit
59cbcc7886
1 file changed
+5
-5
+5
-5
@@ -75,7 +75,7 @@ app.config(($locationProvider, $routeProvider) => {
|
|||||||
resolve: {
|
resolve: {
|
||||||
page: ($route, api) => {
|
page: ($route, api) => {
|
||||||
let page = $route.current.params.page;
|
let page = $route.current.params.page;
|
||||||
if(!page) page = 1;
|
if (!page) page = 1;
|
||||||
|
|
||||||
return api.event
|
return api.event
|
||||||
.list(page)
|
.list(page)
|
||||||
@@ -95,10 +95,10 @@ app.config(($locationProvider, $routeProvider) => {
|
|||||||
name: '/article/:id',
|
name: '/article/:id',
|
||||||
template: '<page-article article="$.data"></page-article>',
|
template: '<page-article article="$.data"></page-article>',
|
||||||
resolveAs: '$',
|
resolveAs: '$',
|
||||||
resolve:{
|
resolve: {
|
||||||
data: ($route, api) => {
|
data: ($route, api) => {
|
||||||
let id = $route.current.params.id;
|
let id = $route.current.params.id;
|
||||||
if(!id) return null;
|
if (!id) return null;
|
||||||
return api.article.id(id)
|
return api.article.id(id)
|
||||||
.then(i => i.data)
|
.then(i => i.data)
|
||||||
}
|
}
|
||||||
@@ -231,8 +231,8 @@ app.run(($location, $rootScope, $http) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
$rootScope.$on('$routeChangeError', (event, current) => {
|
$rootScope.$on('$routeChangeError', (event, current) => {
|
||||||
//let title = current['$$route'].title;
|
// let title = current['$$route'].title;
|
||||||
//if (title) $rootScope.title = title;
|
// if (title) $rootScope.title = title;
|
||||||
});
|
});
|
||||||
|
|
||||||
$http.defaults.headers.common['Accept'] = 'application/json';
|
$http.defaults.headers.common['Accept'] = 'application/json';
|
||||||
|
|||||||
Reference in new issue
Block a user