Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

160
Views
using Angular i want to add an admin page in my app

Hi am developing a angular app having three components all of them have a curd operations i want to add an admin page in app to restrict some users to do some of these operations using toggle button or on/off button.Img is attached I want some thing same like image.ThanksImg link

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

To restrict access to a page, you can add a guard to the certain route. To do this you should add canActivate option and provide an array of guards that should be called when you go to the route.

To create a guard you can use angular cli and run ng generate guard [name] There should be canActivate method inside the guard. For example,

  canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {
    if (this.authService.isAuthorized()) {
      return true;
    }

    this.router.navigateByUrl('/dashboard');
    return false;
  }
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!