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

It is not possible to use the plugin without SystemJs/ Cannot read property 'toString' of undefined #41

Closed
muetzerich opened this issue Sep 26, 2016 · 0 comments

Comments

@muetzerich
Copy link
Contributor

I'm submitting a ...
[x] bug report
[ ] feature request
[ ] question about the decisions made in the repository

What is the current behavior?

It is not possible to use the plugin when SystemJs isn't use ( For example we use babelify).

The following error appears when the app starts:

Uncaught TypeError: Cannot read property 'toString' of undefined

in this code line in toast.component.ts
moduleId: module.id.toString(),

and also in this code line in toasty.component.ts
moduleId: module.id.toString(),

Please tell us about your environment:

  • Angular version: 2.0.1 with babelify
  • Browser: [all ]

Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)

You can use the module.id variable which contains the absolute URL of the component class only with SystemJs.

Solution: You can remove this line of code because you don't include templates or stylesheets relative to your component. Maybe you can find here more detail information about this (http://blog.thoughtram.io/angular/2016/06/08/component-relative-paths-in-angular-2.html)

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

No branches or pull requests

1 participant