tech: minor progress on mobx state tree & react containers, working on unit testing

This commit is contained in:
Torkel Ödegaard
2017-12-27 13:15:27 +01:00
parent 8aff969f70
commit 5b91bb9163
9 changed files with 223 additions and 46 deletions

View File

@@ -16,7 +16,7 @@ function WrapInProvider(store, Component, props) {
export function reactContainer($route) {
return {
restrict: 'E',
template: '<h2>hasad</h2>',
template: '',
link(scope, elem) {
let component = $route.current.locals.component;
let props = {};

View File

@@ -1,26 +0,0 @@
export class BundleLoader {
lazy: any;
constructor(bundleName) {
var defer = null;
this.lazy = [
'$q',
'$route',
'$rootScope',
($q, $route, $rootScope) => {
if (defer) {
return defer.promise;
}
defer = $q.defer();
System.import(bundleName).then(() => {
defer.resolve();
});
return defer.promise;
},
];
}
}

View File

@@ -1,6 +1,6 @@
import './dashboard_loaders';
import './ReactContainer';
import ServerStats from 'app/containers/ServerStats';
import { ServerStats } from 'app/containers/ServerStats/ServerStats';
/** @ngInject **/
export function setupAngularRoutes($routeProvider, $locationProvider) {