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 APIGallery from './APIGallery';
|
||||
import APIDocument from './APIDocument';
|
||||
|
||||
module.exports = function (app) {
|
||||
var minute = 1000 * 60;
|
||||
|
||||
app.factory("api", function ($http) {
|
||||
var api = {};
|
||||
export default function (app) {
|
||||
app.factory('api', function ($http) {
|
||||
let api = {};
|
||||
api.news = new APIFeed($http);
|
||||
api.gallery = new APIGallery($http);
|
||||
api.document = new APIDocument($http);
|
||||
|
||||
+2
-1
@@ -4,6 +4,7 @@
|
||||
|
||||
import Document from './components/Document';
|
||||
import Award from './components/Award';
|
||||
import api from './api/api';
|
||||
|
||||
var deps = [
|
||||
require('./modules/schedule')
|
||||
@@ -79,7 +80,7 @@ app.run(function ($location, $rootScope, $http) {
|
||||
});
|
||||
|
||||
[
|
||||
require("./api/api"),
|
||||
api,
|
||||
require("./services/io"),
|
||||
require("./directives/mainMenu"),
|
||||
require("./directives/teamMemberProfile"),
|
||||
|
||||
Reference in new issue
Block a user