title: How to add javascript for dropdown in materialize CSS?
body: <p>I'm implementing materialize CSS in my AngularJS website which has a structure like this:
  a .html view which is connected to a .js controller which communicates to the database using a .js service.
  I copied this sample dropdown code from materialize website:</p>
  
  <pre><code>&lt;!-- Dropdown Trigger --&gt;
  &lt;a class='dropdown-button btn' href='#' data-activates='dropdown1'&gt;Drop Me!&lt;/a&gt;
  
  &lt;!-- Dropdown Structure --&gt;
  &lt;ul id='dropdown1' class='dropdown-content'&gt;
   &lt;li&gt;&lt;a href="#!"&gt;one&lt;/a&gt;&lt;/li&gt;
   &lt;li&gt;&lt;a href="#!"&gt;two&lt;/a&gt;&lt;/li&gt;
   &lt;li class="divider"&gt;&lt;/li&gt;
   &lt;li&gt;&lt;a href="#!"&gt;three&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>But this dropdown is not working in my website.
  It also has a javascript code attached which I cant figure out where to place.
  I tried placing in my .js controller but still nothing.
  Can someone point me in the right direction.</p>
  
  <p>Here are my .html and .js implementations:</p>
  
  <p>manage_projects.html</p>
  
  <pre><code>&lt;td&gt;{{prj.name}}&lt;/td&gt;
  &lt;td&gt;
   &lt;a class="dropdown-button" href="" data-activates="dropdown"&gt;
     {{prj.skills.length}} skill(s)
   &lt;/a&gt;
   &lt;ul id="dropdown" class="dropdown-content"&gt;
     &lt;li ng-repeat="skl in prj.skills"&gt;
       {{skl.name}}
     &lt;/li&gt;
   &lt;/ul&gt;
  &lt;/td&gt;
  </code></pre>
  
  <p>ManageProjectsController.js</p>
  
  <pre><code>(function () {
  'use strict';
  
  angular.module('app')
  .controller("ManageProjectsController", ['$scope', '$rootScope', '$location', 'UserService', 'ManageProjectService', function ($scope, $rootScope,$location, UserService, ManageProjectService) {
  
  
          if(UserService.GetCurrentUser().role !== 'Executive'){
           $location.path('/dashboard');          
          }
  
          $scope.projects = "";
  
          $('.dropdown-button').dropdown();
  
          ManageProjectService.GetAllProjects().then(function(res){
              $scope.projects = res.data.projects;
          });
  
    }]);
  })();
  </code></pre>