madoar / angular-archwizard

A wizard component for Angular 9+
MIT License
300 stars 103 forks source link

Issue importing 'ng2-archwizard' from Angular Quickstart #23

Closed d3vtoolsmith closed 7 years ago

d3vtoolsmith commented 7 years ago

There must be something trivial I'm overlooking, but I'm having trouble importing 'ng2-archwizard' from within a barebones, official Angular Quickstart.

If I begin with the official import instructions - import { WizardModule } from 'ng2-archwizard'; - after doing npm install --save ng2-archwizard, I get the following error:

zone.js:2622 GET http://localhost:3000/ng2-archwizard 404 (Not Found)

Then, if I add the following line - 'ng2-archwizard': 'npm:ng2-archwizard/dist/index.js' - to systemjs.config.js, I get the following error:

zone.js:2622 GET http://localhost:3000/traceur 404 (Not Found)

Then, if I add reference to traceur inside index.html, the error slightly changes, but persists nonetheless:

zone.js:2622 GET http://localhost:3000/node_modules/ng2-archwizard/dist/components/ 404 (Not Found)

Is there something obvious I'm missing either in the way I reference the library or inside the boilerplate Angular Quickstart?

madoar commented 7 years ago

I must confess, that I have no experience with systemjs. I have always used angular-cli to generate my barebones, which uses webpack instead of systemjs. What I've noticed is, that you've not written about the step where you've added WizardModule to your AppModule. Please check if you did this.

d3vtoolsmith commented 7 years ago

I did include all of the code from installation instructions + <wizard>...</wizard> markup in the template. Sample app works fine until I start importing WizardModule.

import { WizardModule } from 'ng2-archwizard';

@NgModule({
  imports: [
    WizardModule
  ],
})
export class Module { }

I guess I may just regenerate the whole thing with angular-cli if no-one ran into this.

d3vtoolsmith commented 7 years ago

Using angular-cli (with webpack) instead of angular quickstart for project shell solved the issue.

madoar commented 7 years ago

Nice to hear that you got it working via angular-cli and webpack. Still it would be nice if someone knew how to get it working via angular quickstart. If someone got it working feel free to post a comment here how you got it working so that I can extend the README with the related information.

madoar commented 6 years ago

I'm currently working on a new version of ng2-archwizard, i.e. version 3.0.0. This version uses a new build script, which should make it easier to use ng2-archwizard. The new version will require the use of angular 5. If you're already using angular 5 I would appreciate it if you can build the current master branch, to see if the new version solves the problem for you. To build the new version simply clone the repository and run npm run build inside a terminal of your choice. Afterwards be sure to install the newly created dist folder in your target application.

madoar commented 6 years ago

Please be aware that the new version contains some syntactical changes.

vinayistar commented 6 years ago

I visited to https://github.com/madoar/ng2-archwizard/blob/master/README.md and solved previous problem but as I followed this 'aw-wizard-step' is not a known element error but if I use instead of it works...Can u explain why its so??

madoar commented 6 years ago

but if I use instead of it works...

I don't understand: What did you use instead of it?

vinayistar commented 6 years ago

What I have done is I have started with https://www.npmjs.com/package/ngx-archwizard with this NPM tutorial but Later I get to know https://www.npmjs.com/package/ng2-archwizard and solved the import problem of WizardModule.

Im Really confused with 2 NPM's. and also with this ReadME https://github.com/madoar/ng2-archwizard/blob/master/README.md

madoar commented 6 years ago

Ok, I understand your confusion: