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

ERROR TypeError: this.resume is not a function #2

Open
agnongote opened this issue Feb 8, 2018 · 1 comment
Open

ERROR TypeError: this.resume is not a function #2

agnongote opened this issue Feb 8, 2018 · 1 comment

Comments

@agnongote
Copy link

agnongote commented Feb 8, 2018

hi @daoudaDiallo thank for this big tools
i am try to use aclService hide/show somes action on my application but when i use it like this:
html:
<li class="liste-menu" routerLinkActive="active" *ngIf="can('utilisateurs')"> <a routerLink="/contact" title="Contact"> <img src="../../../../assets/img/sidebar/37-8.png" alt="Contact"> &nbsp;&nbsp;<span class="menu-item-parent">{{'Contact' | i18n}}</span> </a> </li>

component:

import {Component, OnInit} from '@angular/core';
import {LogoComponent} from "../../user/logo/logo.component";
import { AclService } from 'ng2-acl/dist';


@Component({

  selector: 'sa-navigation',
  templateUrl: './navigation.component.html',
  styleUrls : ["./navigation.component.css"]
})
export class NavigationComponent implements OnInit {
  can:any;
  constructor(private aclService: AclService) {
  }

  ngOnInit() {
    this.can = this.aclService.can;
  }

}

i get this error fix this issue. please help

@agnongote
Copy link
Author

ok thank for your answer i fix the issue by using like this :
<li class="liste-menu" routerLinkActive="active" *ngIf="aclService.can('utilisateurs')"> <a routerLink="/contact" title="Contact"> <img src="../../../../assets/img/sidebar/37-8.png" alt="Contact"> &nbsp;&nbsp;<span class="menu-item-parent">{{'Contact' | i18n}}</span> </a> </li>
i use aclService.can('utilisateurs') instead of can("utilisateurs) in *ngIf

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