I am using AngularJS 1.6.9 with AngularJS Material. What I want to do is to add a menu item basic usage. The problem is that it didn't work because my structure is different.
Documentation of material says (I never seen it before):
angular
.module('menuDemoBasic', ['ngMaterial'])
.config(function($mdIconProvider) {
$mdIconProvider
.iconSet("call", 'img/icons/sets/communication-icons.svg', 24)
.iconSet("social", 'img/icons/sets/social-icons.svg', 24);
})
.controller('BasicDemoCtrl', function DemoCtrl($mdDialog) {
...
Html:
<div class="md-menu-demo" ng-controller="BasicDemoCtrl as ctrl" ng-cloak>
...
My controller's name is MainController and I don't want to change my syntax.
My js syntax is:
app.controller("MainController", ["$scope","$http","$rootScope", function($scope,$http,$rootScope){
...
How can I change the code, in order to not to change my structure of my Controller and play?