Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using this feature breaks my app routing #59

Open
ErHamza opened this issue Nov 8, 2022 · 0 comments
Open

Using this feature breaks my app routing #59

ErHamza opened this issue Nov 8, 2022 · 0 comments

Comments

@ErHamza
Copy link

ErHamza commented Nov 8, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant