Permalink
Browse files

bug: IOCContainer was used instead of Container

  • Loading branch information...
MikeMitterer committed Dec 19, 2018
1 parent 764c5a7 commit 97c02579ead2bac003da39b413cb3427eb2cda49
@@ -55,7 +55,7 @@ void registerContentComponents() {
registerMaterialInclude();
}

class SPAModule extends ioc.IOCModule {
class SPAModule extends ioc.Module {

@override
configure() {
@@ -21,7 +21,7 @@ part of m4d_spa;

abstract class MaterialController {
/// [iocContainer] will be set after {ViewFactory} receives the {onLoadEnd} Event
ioc.IOCContainer iocContainer;
ioc.Container iocContainer;

/// [loaded] is called after [ViewFactory] received the onLoadEnd-Event
///
@@ -69,7 +69,7 @@ class MaterialContent extends MdlComponent {
static const _MaterialContentCssClasses _cssClasses = const _MaterialContentCssClasses();
final DomRenderer _renderer = DomRenderer();

MaterialContent.fromElement(final dom.HtmlElement element,final ioc.IOCContainer iocContainer)
MaterialContent.fromElement(final dom.HtmlElement element,final ioc.Container iocContainer)
: super(element,iocContainer) {
}

@@ -112,7 +112,7 @@ class _MaterialContentCssClasses {

/// creates MdlConfig for MaterialContent
MdlConfig materialContentConfig() => new MdlWidgetConfig<MaterialContent>(
_MaterialContentCssClasses.MAIN_CLASS, (final dom.HtmlElement element,final ioc.IOCContainer iocContainer)
_MaterialContentCssClasses.MAIN_CLASS, (final dom.HtmlElement element,final ioc.Container iocContainer)
=> new MaterialContent.fromElement(element,iocContainer));

/// registration-Helper
@@ -35,7 +35,7 @@ class MaterialInclude extends MdlComponent {
/// Everyone can listen to this {onLoadEnd} stream
Stream<MaterialContentEvent> onLoadEnd;

MaterialInclude.fromElement(final dom.HtmlElement element,final ioc.IOCContainer iocContainer)
MaterialInclude.fromElement(final dom.HtmlElement element,final ioc.Container iocContainer)
: super(element,iocContainer) {

onLoadEnd = _controller.stream as Stream<MaterialContentEvent>;
@@ -104,7 +104,7 @@ class _MaterialIncludeCssClasses {

/// creates MdlConfig for MaterialInclude
MdlConfig materialIncludeConfig() => new MdlWidgetConfig<MaterialInclude>(
_MaterialIncludeCssClasses.MAIN_CLASS, (final dom.HtmlElement element,final ioc.IOCContainer iocContainer)
_MaterialIncludeCssClasses.MAIN_CLASS, (final dom.HtmlElement element,final ioc.Container iocContainer)
=> new MaterialInclude.fromElement(element,iocContainer));

/// registration-Helper
@@ -17,7 +17,7 @@ dependencies:

dnd: ^1.0.0

m4d_core: '>=0.1.0 <1.0.0'
m4d_core: '>=0.2.0 <1.0.0'
# path: /Volumes/Daten/DevLocal/DevDart/m4d/m4d_core

m4d_flux: '>=0.1.0 <1.0.0'
@@ -64,7 +64,7 @@ main() async {
configLogging(show: Level.INFO);

// Initialize M4D
ioc.IOCContainer.bindModules([
ioc.Container.bindModules([
SPAModule(), CoreComponentsModule()
]).bind(coreService.Application).to(Application());;

@@ -24,7 +24,7 @@ import 'model/store.dart';
class ModelChangedEvent { }

class Application extends MaterialApplication {
final AppStore _store = ioc.IOCContainer().resolve(AppStoreService).as<AppStore>();
final AppStore _store = ioc.Container().resolve(AppStoreService).as<AppStore>();
final router = Router();

@override
@@ -89,7 +89,7 @@ main() async {
configLogging(show: Level.INFO);

// Initialize M4D
ioc.IOCContainer.bindModules([
ioc.Container.bindModules([
SPAModule(), CoreComponentsModule(), AppStoreModule(), TemplateModule()
]).bind(coreService.Application).to(Application());

@@ -121,7 +121,7 @@ class ObservableController extends MaterialController {
_logger.info("ObservableController loaded...");

_timer = Timer.periodic(Duration(seconds: 1), (_) {
final _store = ioc.IOCContainer().resolve(AppStoreService).as<AppStore>();
final _store = ioc.Container().resolve(AppStoreService).as<AppStore>();

String _getTime() {
final DateTime now = new DateTime.now();
@@ -91,15 +91,15 @@ class AppStore extends Dispatcher with SimpleDataStoreMixin {
// }
}

class AppStoreModule extends ioc.IOCModule {
class AppStoreModule extends ioc.Module {
final _store = AppStore._private();

@override
configure() {
ioc.IOCContainer().bind(AppStoreService).to(_store);
ioc.IOCContainer().bind(directiveService.SimpleValueStore).to(_store);
ioc.Container().bind(AppStoreService).to(_store);
ioc.Container().bind(directiveService.SimpleValueStore).to(_store);
}

@override
List<ioc.IOCModule> get dependsOn => <ioc.IOCModule>[ DirectivesModule()];
List<ioc.Module> get dependsOn => <ioc.Module>[ DirectivesModule()];
}
@@ -18,7 +18,7 @@ main() async {
configLogging(show: Level.INFO);

// Initialize M4D
ioc.IOCContainer.bindModules([
ioc.Container.bindModules([
SPAModule(), CoreComponentsModule()
]);

0 comments on commit 97c0257

Please sign in to comment.