Hi Sander, Thanks for the information. I have been reading up on Angular Elements and they seem interesting. From what I understand, they can only be components, i.e. not directives, and can communicate between other Angular Element components on the same page - I assume by injecting the same service? They can not, however, communicate back to the Angular App upon which they are loaded into - as in the example you provided?
The method I have for loading dynamic html content is working, however, your points regarding AOT/JIT are greatly appreciated and now give me cause for concern. In fact, it makes me think that I might want to reconsider how I am loading these pages. Here's my dilemma. The Angular App I am creating will load instructional/learning content (pages) to be run on a Learning Management System (LMS). Some of the content will be interactive, i.e. multiple choice questions, drag and drop, videos, etc. There may even be a scored assessment at the end. There can be anywhere from 3 pages to 30+ or more, as it will vary depending on the course content. The course may even be resumed at a later time from where the user left off, based upon data returned from the LMS. Angular needs to handle the page loading based upon the data returned from the LMS. With all that said, what I have now seems to work really well. I have all the page urls stored in a local JSON file and then depending on which page the user is on, the page dynamically gets loaded. The unknown is how well it will perform when it's 30+ pages and an assessment and I have to use JIT? Am I willing to take the chance to develop the App and find out in the end that it's bogged the browser down due to JIT compiling or as you stated the JIT compiler changes or goes away in future versions. I went this route of loading dynamic content as I didn't think it would be efficient to create 30+ components or more, 1 for each page of content and not including the other components in the App, as well as how to handle routing and what my router might look like? Your suggestion for loading would work great for static content. I am just not sure how to handle the dynamic content - i.e. interactions as I need to communicate back to the App. Do you have any thoughts on my dilemma? I am new to Angular and certainly appreciate any insight you can provide. Thanks again, Scott On Thu, Dec 27, 2018 at 9:09 AM Sander Elias <[email protected]> wrote: > Hi Scott, > > No, my method doesn't support anything angular, Only plain HTML and JS. > You can use Angular Elements if you need a couple that you want to use > inside those pages. > Also, my method will work in AOT and production mode. It is not dependant > on the JIT compiler. > Your method does need JIT, and will not work in AOT mode. Also, if your > subpages are somewhat larger, it will take substantial time to compile them > on the fly. This might not be a problem for your situation, but it's good > to be aware of this. > (BTW, JIT mode might disappear from future version, at least in the form > we have it now) > > Regards > Sander > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Angular and AngularJS discussion" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/angular/PnHiXroP-VI/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/angular. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
