var app = angular.module('hap', ['ngMaterial']);

app.controller('MainCtrl', ['$mdSidenav', 'webEvents', function($mdSidenav, events) {
  this.toggleSidenav = function(menuId) {
    $mdSidenav(menuId).toggle();
  };
  
  this.send = function() {
	  events.emit("message", "It Works!");
  };
  
  events.on("message", function (msg) {
    console.log(msg);
  });
}]);


@@ -97,16 +97,27 @@
 Events',
+ '$window',
  functio
@@ -136,16 +136,25 @@
 , events
+, $window
 ) %7B%0A  th
@@ -375,14 +375,91 @@
 ;%0A  %7D);%0A
+  %0A  this.openEditor = function() %7B%0A    $window.open('/red', '_blank');%0A  %7D;%0A
 %7D%5D);%0A%0A

add open editor side nav command