can angular6 elements have routing? - angular6

With V6, the angular team has introduced angular elements which is good for micro frontends.
However, can they be fully-fledged applications with routing and everything else that a complex angular application might have?

Yes, you can use the router in Angular Elements, however there is an open Github issue:
https://github.com/angular/angular/issues/23740
which also features an example which might help you:
https://stackblitz.com/edit/angular-elements-routing

no yet, it is too soon to apply everything we use in angular 6, I am using https://github.com/CanopyTax/single-spa for the time being. Angular is not ready yet.

Related

can i use html with the MERN stack?

hi I'm completely new to the MERN stack and am completely comfortable with html and CSS. however when I look at MERN tutorials online I see no html. is there a way I can still write up my websites I want to create using html and CSS then dealing with back end using MERN?
The "R" in MERN stands for React, which means writing JavaScript (or TypeScript) using the React ecosystem, usually including JSX (which is an XML/HTML-like syntax for representing UI) React is what you'd use instead of writing HTML and vanilla JS or jQuery. Anything you can do with React, you can do with plain HTML, CSS, and JS, though it might take a lot more work. If you use Mongo, Express, and Node, without React, that would work perfectly fine, but it wouldn't be the MERN stack.
Yes, you can use your normal HTML CSS & JAVASCRIPT for the frontend.
But before that lets understand what is MERN.
MERN --> stands from MongoDB , Express , React , Node js
Let's breakdown more:-
Mongo DB --> This is a database
Express --> This is a package to make our server (just like http package)
React --> This is a frontend framework for creating React apps.
Node js-->This is the environment for running your javascript code (Basically your javascript code runs on a browser environment but when you deploy your javascript codes on the server for making the backend there is no browser that's why we use node to provide a javascript environment to run the javascript files )
Collectively we make a whole website using all these.
But as you said can we use HTML , Yes you can use HTML to make your frontend only but you can't use HTML to program your backend because it's not possible.
In MERN you can replace "R" With (HTML , CSS , JAVASCRIPT) But MEN will be going to remain the same because these are used only to make your backend.
And combining it all We call FullStack web development.
I hope you will get it all. :)

calling an ID EJSUploader on Blazor like as javascript

I try create project using Blazor (server-side) and I want to add JavaScript on .razor pages.
I am really confused about calling an ID on Blazor like javascript uses syncfusion component EJSUploader. Can it be done? I've tried some solutions, but it doesn't run as I expected.
Greetings from Syncfusion support.
We would like to inform you that, there is no need to generate JavaScript pages for calling the Syncfusion Uploader component. Because, we have provided the Uploader component in Blazor platform. In the Razor pages, we can accomplish all the JavaScript features for Uploader component.
Please refer the below UG and Demo link to know more about Blazor Uploader component.
UG Link: https://ej2.syncfusion.com/aspnet-core-blazor/documentation/uploader/getting-started/?no-cache=1
Demo Link: https://ej2.syncfusion.com/aspnet-core-blazor/Uploader/DefaultFunctionalities
If you are facing any issues with our Blazor component, please let us know. We’re happy to assist you.
Regards,
Sureshkumar P.

Best way to render React Components inside HTML templates?

I would like to to use React with Django non Single Page App way - Django will take care of routing, and rendering HTML templates and serving data.
React should be used just on some specific components inside HTML page for eg. (dropdowns, autocomplete, modals), ideally being able to just drop for eg. div element with a class inside HTML and pass props for React component.
What’s the best - maintainable, scalable solution to go about this ?
See django-jsx package and also server side rendering paper. I'm not a frontend specialist but when I've faced such problem, my friends offered me to google isomorphic app with django and react.
I found this add React to an HTML page in one minute page/example to be absolutely painless in rendering a React component inside of a Django template!
This probably isn't what you want to do, given that React has a pretty robust ecosystem around it for building performant single page applications (SPA's). You should be able to decouple your React site from your Django app. Then you'd be able to throw up your React app on a performant CDN, rather than having your Django server hosting every visitor.
But if you insist, the most straightforward way to proceed would probably be to create an index.js & index.html at each Django route. In other words, make a separate "React app" at each route, which Django will serve as users go to each endpoint. I've seen this done before. It's laggy and inefficient (relative to an SPA), but can be done.
If you really intend to go so far as to write raw HTML/CSS/JS and just use React for bits and pieces in between, you'll probably be looking to invoke ReactDOM.render using a variety of second arguments (called container) rather than the standard React-y way of doing a single ReactDOM.render(<App />, document.getElementById('root')); for the whole app to inject into a barebones HTML template.
I notice you tagged your question with server side rendering. If that is a hard requirement for you for some reason, I'd look into using next.js, a Node framework optimized for exactly that.

Polymer in a Chrome packaged app

With the new Material Design released by Google and Polymer being one of the best, if not only, libraries to create such a design with ease, is there anyone to develop a Chrome Packaged App using the library to get the Material Design look it provides? Currently, it gets scripted block by Google's very strict CSP
Check out Vulcanize: http://www.polymer-project.org/articles/concatenating-web-components.html
It's a build tool for crushing HTML imports into a single file. It also has a --csp option that moves <script> into its own file. This will make CSP happy.
We're working on a template for Polymer Chrome App in the Chrome Dev Editor:
https://github.com/dart-lang/chromedeveditor
I'll update this thread once the template is available. This should make Polymer dev in a Chrome app a lot easier.
Here is another option.
If you're big fan of Dart language, you can use https://github.com/sunglim/csp_fixer package.
This package has a function to strip <script/> and create external js file.
Investigating ebidel response about vulcanize, I found that polybuild could be even more easy if you dont want so many extra options.
https://www.polymer-project.org/1.0/docs/tools/advanced#build
Also found this project on github that uses vulvanize with --csp option.
https://github.com/PolymerLabs/polymerchromeapp

JSF / PrimeFaces compatibility with HTML5 Storage methods

Do JSF / PrimeFaces support well HTML5 Storage methods (sessionStorage / localStorage)?
Not out the box. But you can just wrap the necessary HTML/JS code in custom JSF components. One of our previous interns have done that. You can find it in this Google Code repository. Check the POC-SessionStorage part for the source code. You can find a writeup in this thesis.
To the point, it's merely a matter of generating the right HTML/JS code and hooking on JSF ajax events.