title: How to change parent variable from child component in angular2
body: <p>my parent component html:</p>
  
  <pre><code>&lt;app-calendar-component [view]="calView" [callback]="calendarOptions" &gt;&lt;/app-calendar-component&gt;
  &lt;app-weekdetails-component *ngIf="test"&gt;&lt;/app-weekdetails-component&gt;
  </code></pre>
  
  <p>my parent component ts:</p>
  
  <pre><code>public test:boolean=false;
  </code></pre>
  
  <p>appCalendarComponent:</p>
  
  <pre><code>ngOnInit(){
  Calling services here and using data, after this process I need to set 
  my variable test to be true which is defined in parent component.
  }
  </code></pre>
  
  <p>So I need to set variable <strong>test</strong> to be true when 1st child(appCalendarComponent) is initialized.</p>