mendhak/angular-intro.js

TypeScript import not working for me

Closed this issue · 3 comments

When adding the Line import ngIntroJs from 'angular-intro.js';
Also tried import * as ngIntro from 'angular-intro.js';

I'm getting the message File 'node_modules/angular-intro.js/build/ng-intro.component.d.ts' is not a module.

Hello @dzire187

i can't check it right now, i'll get home and check it but, it seems you're trying to compile the .ts file,

that one on "build/ng-intro.component.d.ts" it's just the interface for typescript so you can import on your projects using TS.

if you're trying to compile the ts on your project i recommend using the "src/ng-intro.component.ts" file.

any question post it here i'll help asap :)

@dzire187 Hello! :)

have you tried using the "src/ng-intro.component.ts" ?

Unfortunately not. After getting stuck I just created a service around intro.js. Later dropped the library entirely in favor of hopscotch, due to some issues related to z-index and stacking context.

But to get back to the original issue: I don't think importing from src directly is good code style. it certainly works, but that's not how users usually import modules.