MEAN JS - where is the main html file (index.html) located

I just started learning MEAN JS and I am trying to find the html file for the main page. However, in the browse folder, I see only home.client.view.html and header.clinet.view.html.

From what I know, usually there is a basic html that contains all the information on the home page, and we can add links of CSS files and JS files to the main html file.

How to add links of additional CSS files and JS files to MEAN JS, since I cannot find the main html file?

+5
source share
1 answer

The MEANJS top-level page is located in the server / app / views / layout.server.view.html section and where you set the header meta tags. Most of all, angular is programmatically inserted on the page, for example, links to CSS files and Javascript files.

Any of the CSS or Javascripts files under your server / public are automatically automatically added to the page. If you want to add other, third-party scripts or style sheets, do this by editing the server configuration file located in config / env / all.js.

So, for example, to add a version of the tinymce angular editor to your MEANJS site, you must edit config / env / all.js by adding CSS to module.exports.assets.lib.css and links to the tinymce editor and its angular to module shell. exports.assets.lib.js.

You will need to restart the server (using the "grunt" command) if you modify this file while the server is running.

UPDATE

Using mean-cli@0.6.1 to take up the new medium project, the default β€œtop level” page is in packages/custom/meanStarter/public/views/system , where you will find two files:

  • header.html - which describes the default navigation bar layout
  • index.html - which displays the default page content

Now, having noted this, it should be noted that the β€œright” way to configure the middle server to display its own top-level home page is to create a new middle package.

See the docs for more information.

+5
source

Source: https://habr.com/ru/post/1205242/


All Articles