Giter VIP home page Giter VIP logo

Comments (14)

ash53 avatar ash53 commented on July 20, 2024 1

@pukuotas try the following:
map: {
'ngx-treeview' : 'npm:ngx-treeview/lib'
},
packages: {
"ngx-treeview": { "main": "index.js", "defaultExtension": "js" },
}

from ngx-treeview.

ash53 avatar ash53 commented on July 20, 2024 1

Map just tells the system loader where to look for the installed module and package tells inside that module folder which file you want to run.

from ngx-treeview.

Chandu200881 avatar Chandu200881 commented on July 20, 2024 1

@pukuotas , after running the command "npm install ngx-treeview --save" it save all the component of ngx under src folder

from ngx-treeview.

leovo2708 avatar leovo2708 commented on July 20, 2024 1

Yes, you should use Webpack bundler instead of SystemJS.

from ngx-treeview.

TomBak5 avatar TomBak5 commented on July 20, 2024

thanks, great. Now could you tell me why it is necessary to add package property even you declare it at map prop.? Why it is not enough to write down like 'npm:ngx-treeview/lib/index.js'?

from ngx-treeview.

Chandu200881 avatar Chandu200881 commented on July 20, 2024

Please help to configure ngx-treeview in system.config.js file. I'm getting below error
Error: Fetch error: 404 Not Found
Instantiating http://localhost:8099/ngx-treeview
Loading http://localhost:4200/clientapp/app.module.js

from ngx-treeview.

Chandu200881 avatar Chandu200881 commented on July 20, 2024

@pukuotas, I tried following:
map: {
'ngx-treeview' : 'npm:ngx-treeview/lib'
},
packages: {
"ngx-treeview": { "main": "index.js", "defaultExtension": "js" },
}
but after installing, could find only src folder instead of lib.
\node_modules\ngx-treeview\src

Please suggest the configuration in system.conifg.js file.

from ngx-treeview.

TomBak5 avatar TomBak5 commented on July 20, 2024

@Chandu200881 and what's the content of src? is your app.module ok? what's version of ngx-treeview you use?

from ngx-treeview.

leovo2708 avatar leovo2708 commented on July 20, 2024

Sorry, my component does not support SystemJS.

from ngx-treeview.

Chandu200881 avatar Chandu200881 commented on July 20, 2024

Is their any way where I can use ngx-treeview in my (MVC & Angular 5 integrated application)? if so please suggest the configuration settings and usage.
Thanks in advance!

from ngx-treeview.

TomBak5 avatar TomBak5 commented on July 20, 2024

@leovo2708 you don't need webpack just because to use treeview. The topic is about to solve problem and not to change the speed or etc.

from ngx-treeview.

TomBak5 avatar TomBak5 commented on July 20, 2024

@Chandu200881 it's just a trouble to help you because no details from you. No version you use, no contents you get. You just double posted the same answer that you get src. Src is just a name which often is used for kind of source. And it doesn't tell me anything about it's content. I am using treeview too, but I have 0.0.5 version. So maybe there is a problem because you use newer one. I don't know because no details from you. Sorry but it is very difficult to help you. Try to change lib to src in 'ngx-treeview' : 'npm:ngx-treeview/lib' or kind of.
Btw, I don't think that webpack would solve your problem. I use webpack too. But I use it for a speed of performance but not really to reduce problems. Webpack doesn't reduce problem on itself. Basically (shortly) it just speeds it up and it works well, if you handle it well There are lot of sources saying that webpack is great and it is great when you know how to use it. It helps for basic use too: set once, work long (and fast). As I do now.

from ngx-treeview.

Chandu200881 avatar Chandu200881 commented on July 20, 2024

@pukuotas, I shall give you details

  1. My Application is on MVC 5 with Angular 5 integration.
  2. installed ngx-treeview using "npm install ngx-treeview --save" followed from "https://www.npmjs.com/package/ngx-treeview".
  3. Added in system.config.js
    'ngx-bootstrap': 'npm:ngx-bootstrap/src/index.js'
    under package
    " packages: {
    'ngx-treeview': { main: 'src/index.js', defaultExtension: 'js' },}"
  4. imported in app.module.ts file
    import { TreeviewModule } from 'ngx-treeview';
  5. TreeviewModule.forRoot() defined in imports under @NgModule.
  6. Error I'm getting
    Error: Unable to dynamically transpile ES module
    A loader plugin needs to be configured via SystemJS.config({ transpiler: 'transpiler-module' }).
    Instantiating http://localhost:53969/node_modules/ngx-treeview/src/index.js
    Loading http://localhost:53969/clientapp/app.module.js.
    Please help here

from ngx-treeview.

TomBak5 avatar TomBak5 commented on July 20, 2024

@Chandu200881 I checked: seems that ngx-treeview has src instead of lib since 1.0.2. Try to change 'ngx-treeview' : 'npm:ngx-treeview/lib' to 'ngx-treeview' : 'npm:ngx-treeview/src'. If it doesn't work write down version here..

from ngx-treeview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.