-2

I have the following menu made with materializeCss but a friend recommended to use angular-material, examples of angular material there is one similar to mine and I have not been able to reproduce because the menu is dynamically created according to user permissions. I appreciate if you can tell me how it's done

sebenalern
  • 2,515
  • 3
  • 26
  • 36
Cristian
  • 191
  • 1
  • 2
  • 14
  • 1
    How what is done? Question is too broad. Narrow it down to specifics and show the code you have problems with – charlietfl Jan 13 '16 at 17:31
  • https://stackoverflow.com/questions/49860471/how-to-add-checkbox-to-angular-menu How to add checkbox to angular menu please help – Priya Apr 17 '18 at 14:50

1 Answers1

0

easiest way of doing it For right section: you can use JSON in your controller such as

$scope.jsonTest=[

 {
   imagePath:"",
   title:"",
   userPermission:["admin","superAdmin"] 
 },
 {
   imagePath:"",
   title:"",
   userPermission:["admin"] 
 }
];

and in your html file

you can use

<div ng-repeat="item in jsonTest" >

   <div ng-show="item.indexof(userRole) > 0">
       ....(display content)
   </div>
</div>
Gourav Soni
  • 75
  • 2
  • 11