Skip to content
This repository has been archived by the owner on Jan 17, 2022. It is now read-only.

TypeScript import not working for me #134

Closed
binarybro opened this issue Jun 6, 2017 · 3 comments
Closed

TypeScript import not working for me #134

binarybro opened this issue Jun 6, 2017 · 3 comments

Comments

@binarybro
Copy link

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.

@millerscout
Copy link
Collaborator

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 :)

@millerscout
Copy link
Collaborator

@dzire187 Hello! :)

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

@binarybro
Copy link
Author

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants