Trying to use the DatePicker component, but got the following error:
Error: Uncaught (in promise): Template parse errors:
Can't bind to 'templateUrl' since it isn't a known property of 'datepicker-inner'.
1. If 'datepicker-inner' is an Angular component and it has 'templateUrl' input, then verify that it is part of this module.
2. If 'datepicker-inner' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schema' of this component to suppress this message.
("ustomClass]="customClass"
[dateDisabled]="dateDisabled"
[ERROR ->][templateUrl]="templateUrl"
[onlyCurrentMonth]="onlyCurrentMonth"
"): DatePickerComponent@20:22
zone.js (463,10)
I checked datepicker-inner and there was indeed no templateUrl property. Removing it from datepicker worked, but I'm not sure if I'm supposed to do that.
are you using rc5 ?
Hmm, yes, apparently I am.
I have the same issue since upgrading to rc5. I think its related to that.
Same issue here. Since rc5, it seems that Angular checks before binding if an input variable exists in the component.
Problem in this case is that datepicker.component has on line 33 the following variable declared for the datepicker-inner component.
However, when i check the datepicker-inner component, it seems that it doesn't have templateUrl as an @Input variable and the variable templateUrl is also not used and declared inside the datepicker.component. I think this line is maybe something old? Anyway, removing this line will solve the problem.
Same issue here, Can you please publish a new version with this Fix.
Same issue. Did you plan to publish new version ?
Same issue here
Same here too
same problem.
Can't use date picker, I can't even add it to NgModule
same here too.
Same issue here
any answer from here..
This issue is confirmed and, in fact, there is already a merged pull request to fix this (see above). I am closing this issue to prevent too many "same here" comments.
@robertoea I'm not sure this was actually fixed. I'm seeing the exact same issue occur when running my own custom component through a jasmine test and the version of angular I'm seeing in package.json is @angular/core@~2.1.0.
I'm not using any out-of-the-box angular components. I've included the referenced CUSTOM_ELEMENTS_SCHEMA in my Jasmine unit tests, as well as in the root app.module.ts, to no avail.
App: cisbot-client
Can't bind to 'message' since it isn't a known property of 'message'.
("> <li *ngFor="let message of messageService.messages | async"> <message [ERROR ->][message]="message"></message> </li> </ul> "):
ChatComponent@19:25 'message' is not a known element:
1. If 'message' is an Angular component, then verify that it is part of this module.
2. If 'message' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schemas' of this component to suppress this message.
(" <ul> <li *ngFor="let message of messageService.messages | async"> [ERROR ->]<message [message]="message"></message> </li> </ul> "):
ChatComponent@19:16 Error: Template parse errors: at TemplateParser.parse
(http://localhost:9876/_karma_webpack_/2.bundle.js:6263:19) at RuntimeCompiler._compileTemplate
(http://localhost:9876/_karma_webpack_/2.bundle.js:14402:51) at
http://localhost:9876/_karma_webpack_/2.bundle.js:14307:83 at Set.forEach (native) at compile
(http://localhost:9876/_karma_webpack_/2.bundle.js:14307:47) at
RuntimeCompiler._compileComponents (http://localhost:9876/_karma_webpack_/2.bundle.js:14309:13)
at RuntimeCompiler._compileModuleAndAllComponents
(http://localhost:9876/_karma_webpack_/2.bundle.js:14216:37) at
RuntimeCompiler.compileModuleAndAllComponentsSync
(http://localhost:9876/_karma_webpack_/2.bundle.js:14204:21) at
TestingCompilerImpl.compileModuleAndAllComponentsSync
(http://localhost:9876/_karma_webpack_/2.bundle.js:16875:35) at TestBed._initIfNeeded
(webpack:///C:/Users/dannybullis/CISBot/Client/~/@angular/core/bundles/core-testing.umd.js:761:0 <-
src/test.ts:3216:40)
@theBull What you're describing doesn't seem to have anything to do with this. This issue is about the DatePicker component of ng2-bootstrap. Yours looks more like you haven't defined your message component properly.
If you think that the issue is not on your own code, the angular project is probably a better place to report it: https://github.com/angular/angular/issues
@robertoea you're absolutely right, that's my bad! I believe I landed in this issue from clicking a referenced issue somewhere else (or perhaps just clicked a Google search result) and neglected to check the repo I was in. Sorry about that - nonetheless, thanks for your response. Cheers :]
Most helpful comment
This issue is confirmed and, in fact, there is already a merged pull request to fix this (see above). I am closing this issue to prevent too many "same here" comments.