I want to create a menu that looks like the one in AngularJs Material website (https://material.angularjs.org)
You don't NEED any of this, if you want an identical UX and appearance, I guess there is no reason not to import the service and all. But, if all you want is the collapsability you could solve this with the ng-class directive without importing much; depending how you have your scope setup you might need a different variable for each collapsable zone, something like this:
Toggle Click zone
Stuff that gets hidden
More stuff to hide
In your controller $scope declarations
$scope.collapsedA = true //if you want it to start collapsed
and then in your css something like
.collapsable{
transition: all .2s ease-in-out;
min-height: 20px;
overflow: hidden;
}
.collapsable.collapsed{
height: 0;
min-height: 0;
}