WEBIX-JET in mvc .net core application

Hello, I’m trying to integrate las versión of webix-jet into a mvc .net core application but I can not get any results, I wonder if it’s possible, and if possible, as please, I’ve tried everything

Thanks in advance

webix-jet is working flawlessly with .net core for me.
actually webix is server-side independent.
perhaps you need to configure routing

            app.UseMvc(routes =>
            {
                routes.MapRoute(
                    name: "default",
                    template: "{controller=Home}/{action=App}/{id?}");

                routes.MapRoute(name: "apiNotFound", template: "api/{*url}", defaults: new { controller = "Home", action = "ApiNotFound" });

                routes.MapRoute(name: "defaultNotFound", template: "{*url}", defaults: new { controller = "Home", action = "App" });
            });

second route is not required, only if you want to handle wrong api references.
last route is required if you are using UrlRouter in webix-jet

Hi,

Thanks so much Integral, i still have errors :frowning:

please, you can indicate to me the scheme of your application?, i download to my applicaiton in wwwroot through npm webix, in the file views/shared _Layout.cshtml it includ:


<! DOCTYPE html>

<! - Application →

@RenderBody () @RenderSection ("Scripts", required: false) ------------------------------------------------------- where myapp.js has init webix calls import "./styles/app.css"; import {JetApp, EmptyRouter, HashRouter } from "webix-jet"; export default class MyApp extends JetApp{ constructor(config){ const defaults = { id : APPNAME, version : VERSION, router : BUILD_AS_MODULE ? EmptyRouter : HashRouter, debug : !PRODUCTION, start : "/top/start" }; super({ ...defaults, ...config }); } } if (!BUILD_AS_MODULE){ webix.ready(() => new MyApp().render() ); } and another js files this work fine if i use npm start , then localhost:8080 show de page correctly, but i need create app throw _index.cshtml ---------------------------------------------------------- webapplication ----wwwroot/ --------node_modules --------sources/ ------------locales/ ------------models/ ------------styles/ ------------views/ ------------myapp.js --------.babelrc --------{.....} --------Index.html (same code of _Layout.cshtml) ----Views/ --------Home/ ------------Index.cshtml (empty) --------Share/ ------------_Layout.cshtml (with the code where I refer to myapp.js) I hope to have explained, thank you very much if you can help me.

your problem is not related to .net core
if you do not have to use master layouts do not use them.
use independent view instead.
in any case if you add myapp.js reference to index.chtml it should work.
otherwise you have to check your code.
I would recommend using typescript.
keep all source files out of wwwroot (especially node_modules) and point build directory to wwwroot.

I’m going to try, thanks so much!

Hi,

I have found my mistakes and this is what I should have done.

wwwroot contain all files of webix app,

is need “npm install webix” or node, in project root level, this generate npm folder in “dependencies” mvc project folder

is need , package.json and webpack.config.js configured in project root level,

is need app.UseStaticFiles(); in configure method of startup.cs mvc project

Thanks!!

source files (.ts, .js, .css, .json) should be anywhere out of wwwroot.
wwwroot is a build directory.
app.UseStaticFiles(); is a must

Thanks so much integral, my problem is that I am very newer, but now all works,

Thanks so much