Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use plugin with Angular: angular.ts is not under 'rootDir' #20

Closed
michelebombardi opened this issue Oct 25, 2016 · 5 comments
Closed

Comments

@michelebombardi
Copy link

I've followed the instructions to configure this plugin with angular project. When I try to build the project the following exception is shown:

error TS6059: File 'C:/MyProject/node_modules/nativescript-i18n/angular.ts' is not under 'rootDir' 'C:/MyProject/app'. 'rootDir' is expected to contain all source files.

Inside nativescript-i18n folder there is an angular.ts file (containing the pipe definition) but an angular.d.ts with typescript definitions should be present.

Fix it please :)

@michelebombardi michelebombardi changed the title Unable to use with Angular: angular.ts is not under 'rootDir' Unable to use plugin with Angular: angular.ts is not under 'rootDir' Oct 25, 2016
rborn pushed a commit that referenced this issue Oct 27, 2016
@rborn
Copy link
Collaborator

rborn commented Oct 27, 2016

Hi,
I pushed to github a possible fix (not published to npm yet) Could you please give it a try?
Thank you.

@michelebombardi
Copy link
Author

michelebombardi commented Oct 27, 2016

@rborn I tried your plugin again installing it from git hub repo directly. Now there are no errors during build but at runtime:

The pipe 'L' could not be found

I've included the plugin following the instructions in the main page so, in my app.module.ts:

import { NativeScriptI18nModule } from "nativescript-i18n/angular";     // to add Localization
...

@NgModule({
  imports: [
    ...
    NativeScriptI18nModule
  ]
  bootstrap: [AppComponent]
})

export class AppModule {}

Then, in my html layout:

<ActionItem [text]="share | L" ....></ActionItem>

What am I missing?

@Dragomir-Ivanov
Copy link

Any idea for the above error: "The pipe 'L' could not be found". I am getting the same.

@rborn rborn mentioned this issue Jan 23, 2017
@rborn
Copy link
Collaborator

rborn commented Jan 23, 2017

@Dragomir-Ivanov I pushed a new version on npm, could you please have a look if it fixes the problem?
Thank you.

@Dragomir-Ivanov
Copy link

Now it works. Thanks a ton @rborn !

@rborn rborn closed this as completed Jan 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants