angular2-notifications icon indicating copy to clipboard operation
angular2-notifications copied to clipboard

could you please add working plunker sample ?

Open Kaushik1987 opened this issue 6 years ago • 5 comments

I am new to angular, I am using angular 4 and getting following error .

ERROR Error: Uncaught (in promise): Error: Template parse errors: Can't bind to 'options' since it isn't a known property of 'simple-notifications'.

  1. If 'simple-notifications' is an Angular component and it has 'options' input, then verify that it is part of this module.
  2. If 'simple-notifications' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
  3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. (" <simple-notifications [ERROR ->][options]="options">

My Account details

"): ng:///UsersModule/MyprofileComponent.html@0:23 'simple-notifications' is not a known element: 1. If 'simple-notifications' is an Angular component, then verify that it is part of this module. 2. If 'simple-notifications' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. (" [ERROR ->]

My A"): ng:///UsersModule/MyprofileComponent.html@0:1 Error: Template parse errors: Can't bind to 'options' since it isn't a known property of 'simple-notifications'. 1. If 'simple-notifications' is an Angular component and it has 'options' input, then verify that it is part of this module. 2. If 'simple-notifications' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. 3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. (" ][options]="options">

My Account details

"): ng:///UsersModule/MyprofileComponent.html@0:23 'simple-notifications' is not a known element: 1. If 'simple-notifications' is an Angular component, then verify that it is part of this module. 2. If 'simple-notifications' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. (" [ERROR ->]

My A"): ng:///UsersModule/MyprofileComponent.html@0:1 at syntaxError (http://localhost:4201/vendor.bundle.js:28880:34) at TemplateParser.webpackJsonp.../../../compiler/@angular/compiler.es5.js.TemplateParser.parse (http://localhost:4201/vendor.bundle.js:40000:19) at JitCompiler.webpackJsonp.../../../compiler/@angular/compiler.es5.js.JitCompiler._compileTemplate (http://localhost:4201/vendor.bundle.js:54152:39) at http://localhost:4201/vendor.bundle.js:54072:62 at Set.forEach (native) at JitCompiler.webpackJsonp.../../../compiler/@angular/compiler.es5.js.JitCompiler._compileComponents (http://localhost:4201/vendor.bundle.js:54072:19) at http://localhost:4201/vendor.bundle.js:53959:19 at Object.then (http://localhost:4201/vendor.bundle.js:28869:148) at JitCompiler.webpackJsonp.../../../compiler/@angular/compiler.es5.js.JitCompiler._compileModuleAndComponents (http://localhost:4201/vendor.bundle.js:53958:26) at JitCompiler.webpackJsonp.../../../compiler/@angular/compiler.es5.js.JitCompiler.compileModuleAsync (http://localhost:4201/vendor.bundle.js:53887:37) at syntaxError (http://localhost:4201/vendor.bundle.js:28880:34) at TemplateParser.webpackJsonp.../../../compiler/@angular/compiler.es5.js.TemplateParser.parse (http://localhost:4201/vendor.bundle.js:40000:19) at JitCompiler.webpackJsonp.../../../compiler/@angular/compiler.es5.js.JitCompiler._compileTemplate (http://localhost:4201/vendor.bundle.js:54152:39) at http://localhost:4201/vendor.bundle.js:54072:62 at Set.forEach (native) at JitCompiler.webpackJsonp.../../../compiler/@angular/compiler.es5.js.JitCompiler._compileComponents (http://localhost:4201/vendor.bundle.js:54072:19) at http://localhost:4201/vendor.bundle.js:53959:19 at Object.then (http://localhost:4201/vendor.bundle.js:28869:148) at JitCompiler.webpackJsonp.../../../compiler/@angular/compiler.es5.js.JitCompiler._compileModuleAndComponents (http://localhost:4201/vendor.bundle.js:53958:26) at JitCompiler.webpackJsonp.../../../compiler/@angular/compiler.es5.js.JitCompiler.compileModuleAsync (http://localhost:4201/vendor.bundle.js:53887:37) at resolvePromise (http://localhost:4201/polyfills.bundle.js:6328:31) at resolvePromise (http://localhost:4201/polyfills.bundle.js:6299:17) at http://localhost:4201/polyfills.bundle.js:6376:17 at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invokeTask (http://localhost:4201/polyfills.bundle.js:5969:31) at Object.onInvokeTask (http://localhost:4201/vendor.bundle.js:58919:33) at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invokeTask (http://localhost:4201/polyfills.bundle.js:5968:36) at Zone.webpackJsonp.../../../../zone.js/dist/zone.js.Zone.runTask (http://localhost:4201/polyfills.bundle.js:5736:47) at drainMicroTaskQueue (http://localhost:4201/polyfills.bundle.js:6140:35) at defaultErrorLogger @ core.es5.js:1020 webpackJsonp.../../../core/@angular/core.es5.js.ErrorHandler.handleError @ core.es5.js:1080 next @ core.es5.js:4503 schedulerFn @ core.es5.js:3635 webpackJsonp.../../../../rxjs/Subscriber.js.SafeSubscriber.__tryOrUnsub @ Subscriber.js:238 webpackJsonp.../../../../rxjs/Subscriber.js.SafeSubscriber.next @ Subscriber.js:185 webpackJsonp.../../../../rxjs/Subscriber.js.Subscriber._next @ Subscriber.js:125 webpackJsonp.../../../../rxjs/Subscriber.js.Subscriber.next @ Subscriber.js:89 webpackJsonp.../../../../rxjs/Subject.js.Subject.next @ Subject.js:55 webpackJsonp.../../../core/@angular/core.es5.js.EventEmitter.emit @ core.es5.js:3621 (anonymous) @ core.es5.js:3912 webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invoke @ zone.js:391 webpackJsonp.../../../../zone.js/dist/zone.js.Zone.run @ zone.js:141 webpackJsonp.../../../core/@angular/core.es5.js.NgZone.runOutsideAngular @ core.es5.js:3844 onHandleError @ core.es5.js:3912 webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.handleError @ zone.js:395 webpackJsonp.../../../../zone.js/dist/zone.js.Zone.runGuarded @ zone.js:157 _loop_1 @ zone.js:666 api.microtaskDrainDone @ zone.js:675 drainMicroTaskQueue @ zone.js:603

Kaushik1987 avatar Aug 05 '17 19:08 Kaushik1987

Can you format this in a human readable way?

jotatoledo avatar Aug 07 '17 16:08 jotatoledo

same issue. not working on angular 4.3.2.

shekhar-shubhendu avatar Aug 08 '17 05:08 shekhar-shubhendu

Same here.

alceucardoso avatar Aug 25 '17 18:08 alceucardoso

You need to provide the options into your component:

// app.component.ts
export class AppComponent {
  public options = {
      position: ["bottom", "left"],
      timeOut: 5000,
      lastOnBottom: true
  }
}

laertispappas avatar Oct 10 '17 18:10 laertispappas

Same issue here, even with options in the component. Angular 4.3.1 and 0.7.8.

katafractari avatar Oct 23 '17 09:10 katafractari