Added the function to link in the directive, still showing the error


#1


#2

Hello there seems be a problem with the sample code, i had this same issue.
Notice the commas after the scope.buttonText and scope.installed. Replace them with a semicolon.
Should look like this:

app.directive('installApp', function() {
  return {
    restrict: 'E',
    scope: {},
    templateUrl: 'js/directives/installApp.html',
    
    
link: function(scope, element, attrs) { 
  scope.buttonText = "Install";
  scope.installed = false;

  
  scope.download = function() { 
    element.toggleClass('btn-active'); 
    if(scope.installed) { 
      scope.buttonText = "Install"; 
      scope.installed = false; 
    } else { 
      scope.buttonText = "Uninstall"; 
      scope.installed = true; 
    } 
  };
}
    
    
  };
});