old_contents: angular.module('meganote.notes',[
    'ui.router'
  ])
  .config(function($stateProvider) {
    $stateProvider
  
      .state('notes', {
        url: '/notes',
        templateUrl:'notes/notes.html' ,
        controller: 'NotesController'
      })
      .state('notes.form',{
        url:'/:noteId', //noteId is a varaiable so this says: .../noteId
        templateUrl : 'notes/notes-form.html'
      });
  })
  .controller('NotesController',function($scope){
  
    $scope.notes = [];
    $scope.note = {title:'', body:''};
    $scope.save = function(){
      $scope.notes.push($scope.note);
      $scope.note ={title:'', body:''};
    }
  });
  
new_contents: (function(){
    angular
      .module('meganote.notes',['ui.router'])
      .config(notesConfig)
      .controller('NotesController', NotesController);
    function notesConfig($stateProvider){
        $stateProvider
  
          .state('notes', {
            url: '/notes',
            templateUrl:'notes/notes.html' ,
            controller: 'NotesController'
          })
          .state('notes.form',{
            url:'/:noteId', //noteId is a varaiable so this says: .../noteId
            templateUrl : 'notes/notes-form.html'
          });
      }
    function NotesController($scope){
        $scope.notes = [];
        $scope.note = {title:'', body:''};
        $scope.save = function(){
          $scope.notes.push($scope.note);
          $scope.note ={title:'', body:''};
        }
      };
  })();
  
subject: Clean up notes.js file