Giter Site home page Giter Site logo

Getting 404 error about angular2-notifications HOT 11 CLOSED

flauc avatar flauc commented on May 24, 2024 2
Getting 404 error

from angular2-notifications.

Comments (11)

flauc avatar flauc commented on May 24, 2024 1

Thank you @ashajjar 👍

from angular2-notifications.

flauc avatar flauc commented on May 24, 2024

HI @superzaky, i don't know if this is the issue that is causing the error but for starters try removing NotificationsService from the providers array on line 10 of public/app/components/login/login.component.ts.

You don't need to register the provider again in your components the SimpleNotificationsModule does that for you on bootstrap.

from angular2-notifications.

superzaky avatar superzaky commented on May 24, 2024

Hello @flauc thanks for your reply, but that didn't solved it unfortunately. The problem still occurs..

from angular2-notifications.

flauc avatar flauc commented on May 24, 2024

I'll have a look at the project over the weekend. Sorry i can't help sooner.

from angular2-notifications.

ersinpw avatar ersinpw commented on May 24, 2024

Same problem here :(

from angular2-notifications.

oytuntez avatar oytuntez commented on May 24, 2024

Could this be related to #25? See replies by @rkralston and @oytuntez.

from angular2-notifications.

ashajjar avatar ashajjar commented on May 24, 2024

I am getting the same error... I am using 0.3.0 with rc5 any solutions? suggestions?

from angular2-notifications.

ashajjar avatar ashajjar commented on May 24, 2024

hey guys I solved the problem, and it turned out to be system config issue, I will guide you through what I've done step-by-step:

1- Update your angular-cli-build.js to look like this:

var Angular2App = require('angular-cli/lib/broccoli/angular2-app');

module.exports = function(defaults) {
  return new Angular2App(defaults, {
    vendorNpmFiles: [
      'systemjs/dist/system-polyfills.js',
      'systemjs/dist/system.src.js',
      'zone.js/dist/**/*.+(js|js.map)',
      'es6-shim/es6-shim.js',
      'reflect-metadata/**/*.+(ts|js|js.map)',
      'rxjs/**/*.+(js|js.map)',
      '@angular/**/*.+(js|js.map)',
      'angular2-notifications/**/*.+(js|js.map)' // <------------------- this is the line I added
    ]
  });
};

2- In your src/system-config.ts add 'angular2-notifications': 'vendor/angular2-notifications' to your const map:any constant.
3- In your src/system-config.ts in the const packages:any constant add the following key-value pair:

const packages: any = {
  'angular2-notifications': {
    format: 'cjs',
    defaultExtension: 'js',
    main: 'components.js'
  },
};

4- Finally to use the classes of this lib, import it in your .ts files as usual.

For me this solved the 404 problem, but now I got another issue that is, the options of the notification, they are not working properly -_-

from angular2-notifications.

jseparovic avatar jseparovic commented on May 24, 2024

Is anyone able to get this working with angular2-seed project from here https://github.com/mgechev/angular-seed#configuration

I'm getting this error:
(SystemJS) XHR error (404 Not Found) loading http://localhost:5555/node_modules/angular2-notifications.js(…)

from angular2-notifications.

tomlobato avatar tomlobato commented on May 24, 2024

@jseparovic +1
Tried all the suggestions here and others. Something`s broken with flauc/angular2-notifications and/or angular2-seed.

from angular2-notifications.

shavindraSN avatar shavindraSN commented on May 24, 2024

For those who still have the issue, try to map as follows in system.config.js. It worked for me.

 map: {
    'angular2-notifications': 'npm:angular2-notifications'
 } 

instead of

map: {
  'angular2-notifications': 'node_modules/angular2-notifications/components.js'
} 

from angular2-notifications.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.