简体   繁体   中英

Visual Studio IDE Doesn't Recognize EJS Variable in Javascript

I am making a project in Nodejs with the express framework I am using EJS as a template engine, I use Visual Studio as an IDE.

I have a problem while using EJS variable in the same ejs file, it renders correctly and works perfectly but Visual Studio marks it an error at the syntax

Is there any Tools or Extensions Features available, To overcome this issue

Error shown in IDE

在此处输入图片说明

Any one please help in solving this error in Visual Studio.

Right-click any given *.ejs file, and Select "Open With". In the dialog that opens, select "HTML (Web Forms) Editor" and select it as default.

Now, when you open your EJS files, you will get syntax highlighting and intellisense for your HTML. This does not give you support for EJS Code snippets, but will not throw errors.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM