api ES6 refactoring
This commit is contained in:
1 parent
f863db1d0a
commit
68eaaf2338
2 files changed
+5
-10
No files matched your search
@@ -1,16 +1,10 @@
|
|||||||
/**
|
|
||||||
* Created by tmshv on 22/11/14.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import APIFeed from './APIFeed';
|
import APIFeed from './APIFeed';
|
||||||
import APIGallery from './APIGallery';
|
import APIGallery from './APIGallery';
|
||||||
import APIDocument from './APIDocument';
|
import APIDocument from './APIDocument';
|
||||||
|
|
||||||
module.exports = function (app) {
|
export default function (app) {
|
||||||
var minute = 1000 * 60;
|
app.factory('api', function ($http) {
|
||||||
|
let api = {};
|
||||||
app.factory("api", function ($http) {
|
|
||||||
var api = {};
|
|
||||||
api.news = new APIFeed($http);
|
api.news = new APIFeed($http);
|
||||||
api.gallery = new APIGallery($http);
|
api.gallery = new APIGallery($http);
|
||||||
api.document = new APIDocument($http);
|
api.document = new APIDocument($http);
|
||||||
|
|||||||
+2
-1
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
import Document from './components/Document';
|
import Document from './components/Document';
|
||||||
import Award from './components/Award';
|
import Award from './components/Award';
|
||||||
|
import api from './api/api';
|
||||||
|
|
||||||
var deps = [
|
var deps = [
|
||||||
require('./modules/schedule')
|
require('./modules/schedule')
|
||||||
@@ -79,7 +80,7 @@ app.run(function ($location, $rootScope, $http) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
[
|
[
|
||||||
require("./api/api"),
|
api,
|
||||||
require("./services/io"),
|
require("./services/io"),
|
||||||
require("./directives/mainMenu"),
|
require("./directives/mainMenu"),
|
||||||
require("./directives/teamMemberProfile"),
|
require("./directives/teamMemberProfile"),
|
||||||
|
|||||||
Reference in new issue
Block a user