title: Adding/Updating Items in Local Json File || Separating The Controller and Services Files
body: <p>im new to angular and im trying to build a simple todo list application.Im using Ionic framework and test it using yeoman server. i've alredy managed to load a local json file but i searched and i can't find how to add items/update it.I will appreciate if you can give me direction on how to do this. </p>
  
  <p>The second thing i want to do is to separate my controllers and services. currectly all the services are in the controllers.js file.
  both tasks should be pretty easy for the one that are experience with angular so i thought i'll just leave it for you guys :P</p>
  
  <p>app.js:<code>angular.module('Todo', ['ionic', 'Todo.controllers'])</code></p>
  
  <p>Playlist.js(first page you get when lunching the app):</p>
  
  <pre><code> &lt;ion-content class="has-header"&gt;
      &lt;ion-list&gt;
        &lt;ion-item ng-repeat="playlist in playlists" href="#/app/playlists/{{playlist.id}}"&gt;
          {{playlist.title}}
        &lt;/ion-item&gt;
      &lt;/ion-list&gt;
    &lt;/ion-content&gt;
  </code></pre>
  
  <p>controller:</p>
  
  <pre><code>.controller('PlaylistsCtrl', function($scope, $http) {
  
    $http.get('jsonfile.json').success(function(data){
          console.log(data);
          $scope.playlists = data;
    }); 
  })
  </code></pre>