Skip to content

Using this feature breaks my app routing #59

@ErHamza

Description

@ErHamza

Somehow the tag breaks my app.
after using it in my html template I coudnt't use my navigation bar and the content of my component has disappeared
this is my home.component.ts

import { AfterContentInit,
    ChangeDetectionStrategy, Component, 
   ElementRef,
    OnDestroy,
    OnInit,
    Renderer2,
     } from '@angular/core';
import { TextAnimation } from 'ngx-teximate';
import { rotateInDownLeft, fadeIn } from 'ng-animate';



@Component({
  selector: 'app-home',
  templateUrl: './home.component.html',
  styleUrls: ['./home.component.css'],
  changeDetection: ChangeDetectionStrategy.OnPush
  
})
export class HomeComponent implements OnInit , AfterContentInit,OnDestroy  {
  

  

  constructor(private renderer : Renderer2, private el : ElementRef) { }
  
 
  text = 'Start editing to see some magic happen :)';
  
  enterAnimation: TextAnimation = {
    animation: fadeIn,
    delay: 50,
    type: 'letter'
  };
  ngOnInit(): void {
  }

  

 
  

  ngAfterContentInit(): void {
    
    
    
    this.renderer.setStyle(this.el.nativeElement.ownerDocument.body,'backgroundColor', '#d8dee9');
  
  
  
  }

  ngOnDestroy(): void {
    this.renderer.removeStyle(this.el.nativeElement.ownerDocument.body,'backgroundColor');
    
  }


}

HTML template :


<h1>
	<teximate #teximate [text]="text" [enter]="enterAnimation"></teximate>
</h1>

<button (click)="teximate.enterPlayer.play()">Play</button>

I have done the necessary imports in app.module.ts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions