Answer the question
In order to leave comments, you need to log in
How is regular client development different from AngularJS development?
Last time I was advised to use babel + es6-loader + systemjs for an angularjs application.
I installed, did and forgot. Then I had to do a little pure js craft without using angularjs and I chose requirejs for this. I had one question, but while I was waiting for an answer, I figured it out myself. But for the most part he got it done quickly.
But in this thread, I was again advised to return to es6, and without thinking twice, I started from scratch and returned the already familiar babel + es6 + system bundle, only without angularjs.
And so I since yesterday also am excruciated. Now, for some reason, it’s not enough to just import the main.js entry point into the systemfile file, now the promise comes there. And main now needs to be exported, and if you just write export, then the main function will be available on target from then, like target.main. And if you make export by default, then target.default.main.
If I try to import something in main, then everything stops with an error -
TypeError: Invalid anonymous System.register module load. If loading a single module, ensure anonymous System.register is loaded via System.import. If loading a bundle, ensure all the System.register calls are named.
Answer the question
In order to leave comments, you need to log in
the difference is that angular has:
- its own system of modules with lazy initialization (do not care about the loading order, if everything loaded quickly)
- the global function angular.bootstrap which is called by promise resolve, in your case you need to get the loaded function and call it manually .
Something like this. Angular takes a small part of the boring boilerplate.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question