-3

Can't bind to ngIf since it isn't a known property

<AddWrkFrcePopUp *ngIf="showWrkFrcePop === true" (closeWrfFrcePop)="_closeWrkFrcePop()">
</AddWrkFrcePopUp>
Lazar Ljubenović
  • 15,745
  • 7
  • 45
  • 80
rajeev tejapuriya
  • 125
  • 1
  • 2
  • 11
  • 2
    This is most often caused by a missing imports in your Angular module. Can you post what your angular module looks like? (The one that declares AddWrkFrcePopUp) – DeborahK Jul 04 '17 at 06:56
  • Also, please, You would greatly improve the readability of your code by adding those two missing `o`s and `up`, and removing this useless `=== true`: `*ngIf="showWorkForcePopup"` – JB Nizet Jul 04 '17 at 07:00

2 Answers2

1

If you are using RC5 then import this:


    import { CommonModule } from '@angular/common';  
    import { BrowserModule } from '@angular/platform-browser';

and be sure to import CommonModule from the module that is providing your component.

@NgModule({
   imports: [CommonModule],
   declarations: [MyComponent]
   ...
 })
class MyComponentModule {}
Raed Khalaf
  • 1,801
  • 10
  • 25
0

it worked with that, no need fro BrowserModule in my case

import { CommonModule } from '@angular/common'  

and add CommonModule to the Imports

 imports: 
  [
    CommonModule
  ],
MNF
  • 580
  • 7
  • 11