Is it possible to call Static HTML Page in Angular project in Routing? - html

I have a few static pages like About US, Summary Info, etc.
Now, I do not want to create these pages in Angular, because these pages may change in time. I want to reduce the overhead of building Angular project every time for a static page and I want to call this static HTML pages directly from my Angular page so that whenever any change in this static page occurs, I can just simply replace these pages. This way I won't need to re-build the entire Angular project. Is it possible???

Related

Is it possibile to swap determined pages with ones coming from a RCL?

My Blazor WASM app has some pages that should be customized and different for every customer. Can I override my starting pages with the ones inside an external Razor Class library?

how to know when a website is static or dynamic

Is a web page that is automatically querying an api every 30 seconds,
Without any user interaction, a static or dynamic web page?
If it is a static website is it ok to use reactjs or would it be good to use nextjs?
According to me .. if you don't update the content of your web page.. Then it's static. But if your content is changed according to user/product/region then it will be dynamic webpage.
For example in static we can consider web1.0 website where data is changed manually and no action is performed. But in web 2.0 data changed and even received from backend with different logic.
So this is the difference between static and dynamic.
Now move on your question-
You can use useEffect() function of ReactJs where you can set an array of time. That will fetch data from time to time.
either a static or dynamic i advice you to use ReactJs.(Personal Opinion)
Hope you like the answer if you still face any problem, just lemme know.
Thanks

How to create a GWT page?

I have to make a website with different Java-Tasks and informations. The user can join the homepage and can click to different pages. On the Java page he can do some tasks. The website is completely done with HTML. Now i need GWT for the tasks.(multiple choice etc.) This page is easy to make, when i only have this page. But how can i put all these things together. I mean: a homepage and different pages with only html and links and a page which is also linked to all other pages for navigation and is done with gwt for the different tasks. Do i need GWT for all the other pages or only for the task-page? On the other pages there is only text.
You don't need GWT for all the pages, but you can use it.
You can create a GWT project with a Module for the GWT page you want and a static HTML for each one of the HTML pages.
Alternatively, you can build a web application that loads the content of each page dynamically in the same element (e.g. in <div id="content"></div>), based a URL token (e.g. < url >#somepage) triggered by your menu items. You can get the token value in GWT with com.google.gwt.user.client.History.getToken().
Web applications such as Gmail work like that. For your use case, with many static pages (pure HTML), it might seem to be an overkill. But if you are using GWT anyway, I would do it like that. In the long term you don't have to update the menu in each HTML page, as you have a single widget for that. You get scalability and a better project organization.

How to emulate the behavior of master page in Net.Core and VS Code

When building an MVC project, there's a shared folder automatically provided in which I have Layout.cshtml page that's used like the holder or master page (as it was called in Web Forms). So, all the banners, navbars, footers etc. go in there, while the acutal pages being developed refer to it in the source code and got pasted together upon rendition. This far I'm following.
Now, I have a set up and AspNet website using Yeoman and the only thing I have is wwwroot directory in which I put the file start.html. (It's the same as index.html - I just wanted to try out if I have full control over default files.)
I'm unsure how to proceed. I.e. I'd like the links on the start.html to point to files like uno.html, duo.html etc. and read those into a designated part of the landing page (i.e. start.html).
Is it doable without using the magic of templates? I want to have full control over the rendition process.
There's no point googling it, I noticed, because anything I've got the last two hours leads to how to create master page not to how to emulate master page.
Well, the static files middleware is just for that: static files.
You roughly have two options:
Do everything client sided, i.e. rather than having normal links use javascript/ajax calls and embed the content of the static file in your start.html using javascript.
It should work, but has several down-sites like it requires javascript to work (not a big issue these days, except for the paranoids who use no-script browser extensions) and that web crawler still may have issues properly indexing ajax heavy web pages
Wait until ASP.NET Core 1.2 (scheduled for Q1-Q2 2017), which will add Razor Pages. Pages rendered with Razor template engine, but without the need of a controller.
1.2
WebSockets
SignalR
Razor Pages (Views without MVC controllers)
Web API security
If you don't wanna wait, try RazorLight, which is 3rd party open source library for rendering Razor views.
But all except the first one require some "magic template engine".
You could of course write an server-sided includes (SSI) middleware which would be based on UseStaticFiles middleware and parse the file and include the html files server sided before returning it. There is nothing out of the box for it as far as I know.

App design using Angular js

Been working on building a huge app using angular js. Have seen too many questions on the same topic on how best we can design an app, but still am lil confused.
A basic app usually has a
1) Login page/Index page
2) Home page - with headers and footers. Body being the partial/composite which keeps on changing.
since we don't have handle to load multiple ng-views, which is best way to structure the Home page such a way that we have one single HomePage container with headers and footers and Body is loaded dynamically via $route.
Right now I have designed it using a single LoginContainerPage which loads Login page and home pages via $routers, but since only a single ng-view is allowed i cant use another ng-view within the Home page to laod the body dynamically again. i am not keen to use ng-include as well.
Another way to go is keep LoginPage outside the $route and start routing from HomePage such that the Body is loaded dynamically.
Wanted to check if there are any better ideas around.
Thanks in advance!!
well in the project i'm working on with angularjs i took this approach:
i had a header that was the main navigation system i made a controller for that that handled the navigation system and knew about where i am right now. i had an ngView which loaded my main content based on routes but sometimes i needed different templates to be loaded and compiled base on some event for instance ajax loaded tabs. i implemented these types of things using ngInclude that the main controller on the view had the responsibility to choose the template and include it, i believe there is no need for multiple ngViews you can simply use scopes to implement different things and handle different parts of your app with different controllers and data. i guess the best idea for you is to make your login page separate.
i did this in my project. my login page was the only non-Ajax page that i had.
edit:
for authetication part if you wish to implement the authentication through angular you migh want to check this.