Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
@Component({
selector: 'app-section-1',
templateUrl: './section1.component.html',
styleUrls: ['./section1.component.scss']
})
export class Section1Component implements OnInit {
list = []
allItems = ['item1', 'item2', 'item3'],
someItems = ['item1', 'item2'];
constructor(
Private aclService: AclService
) {}
ngOnInit() {
if( this.aclService.can('SECTION1:SEE_ALL_ITEMS') ) {
this.list = this.allItems;
} else {
this.list = this.someItems;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment