mcnLeandro / UML_App

0 stars 0 forks source link

Have to Think about Order of importing files #11

Closed mcnLeandro closed 3 years ago

mcnLeandro commented 3 years ago

I called console.log from last line of each files. Then ...

sshot

There is a function that get Hash of Model, View, Controller, Listener. https://github.com/mcnLeandro/UML_App/blob/afe8570ef87f3966fe5ef618618e756218cb586a/src/js/utils/index.js#L88 I called the function from FociController and see.

sshot 1

I think this is caused by ClassesController and 'ClassesListener' are loaded after utils/index.js or FociController.

..So how to control ordering?? Is there any good solution?

mcnLeandro commented 3 years ago

https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Statements/import#dynamic_imports Dynamic import was the solution!!!