Open sanket360 opened 8 years ago
I have the same problem. I'm using Angular 2.0.1 @brinkmanjg
I am facing the same issue, I'am using Angular 2 RC5
this needs to be updated to fix its own module location. For now we got around this issue by importing directly to the file that is needed
import { Typeahead } from '../../../node_modules/ng2-typeahead/src/ng2-typeahead';
The package is missing some .d.ts file to allow the Typescript compiler to work.
As a workaround, create the following files in 'node_modules/ng2-typeahead/
index.d.ts
export declare const TYPEAHEAD_CONTROL_VALUE_ACCESSOR: any; export * from './lib/ng2-typeahead';
lib/ng2-typeahead.d.ts `import { EventEmitter, OnInit } from '@angular/core'; import { ControlValueAccessor } from '@angular/forms'; export declare const TYPEAHEAD_CONTROL_VALUE_ACCESSOR: any; export declare class Typeahead implements OnInit, ControlValueAccessor { /**
then you can use a clean import { Typeahead } from 'ng2-typeahead';
Still feels more dirty than ribsies solution but I like it more than directly referencing the source typescript file. With this, you can at least keep your imports clean, until the package delivers the .d.ts file itself (which is probably just a case of missing files in the upload?)
Hi
I am keep getting error after following steps mentioned in readme file-
Below is my code-
app.module.ts
app.component.ts
systemjs.config.js