<commit_before>export class ActionController {
  constructor($firebaseArray, $stateParams,$log) {

    'ngInject';
    this.person='';
    this.items='';
    this.text='';
    this.assignee=[];
    this.clog = $log;

    this.roomID=$stateParams.roomKey;

    var roomRef = new Firebase('https://vyapi.firebaseio.com/rooms/'+this.roomID);
    this.actionLabel='';
    roomRef.on("value",(snapshot)=>{
      let labelData = snapshot.val();
      this.actionLabel = labelData.actionLabel;
    });
    var room = roomRef.child("members");
    room.on("value", (snapshot) => {
      snapshot.forEach((uid)=>{
        var personRef = new Firebase('https://vyapi.firebaseio.com/users/');
        var googleData=personRef.child(''+uid.key()+'/google/');
        $firebaseArray(googleData);
        googleData.on('value',(userSnapshot)=>{
          var userNames=userSnapshot.val()['displayName'];
          this.assignee.push(userNames);
        });
      });
    });


    this.myDataRef = new Firebase('https://vyapi.firebaseio.com/action/'+this.roomID);
    this.items=$firebaseArray(this.myDataRef);
  }


  add() {
    this.items.$add({task:this.text,name:this.person});
    this.text = '';
  }

  change(person)
  {
    this.person=person;
  }

  modify(person)
  {
    this.clog.log('modify'+person.name);
    this.myDataRef.child(person.key).set({task:person.task,name:person.name});
    this.person=person;
  }

  remove(item)
  {
     var result=window.confirm("This action item will be deleted.Are you sure?");
      if(result)<commit_msg>fixed #136 action assignee persist on reloading<commit_after>export class ActionController {
  constructor($firebaseArray, $stateParams,$log) {

    'ngInject';
    this.person='';
    this.items='';
    this.text='';
    this.assignee=[];
    this.clog = $log;

    this.roomID=$stateParams.roomKey;

    var roomRef = new Firebase('https://vyapi.firebaseio.com/rooms/'+this.roomID);
    this.actionLabel='';
    roomRef.on("value",(snapshot)=>{
      let labelData = snapshot.val();
      this.actionLabel = labelData.actionLabel;
    });
    var room = roomRef.child("members");
    room.on("value", (snapshot) => {
      snapshot.forEach((uid)=>{
        var personRef = new Firebase('https://vyapi.firebaseio.com/users/');
        var googleData=personRef.child(''+uid.key()+'/google/');
        $firebaseArray(googleData);
        googleData.on('value',(userSnapshot)=>{
          var userNames=userSnapshot.val()['displayName'];
          this.assignee.push(userNames);
        });
      });
    });


    this.myDataRef = new Firebase('https://vyapi.firebaseio.com/action/'+this.roomID);
    this.items=$firebaseArray(this.myDataRef);
  }


  add() {
    this.items.$add({task:this.text,name:this.person});
    this.text = '';
  }

  change(person)
  {
    this.person=person;
  }

  modify(person)
  {
    console.log(person);
    this.clog.log('modify'+person.name);
    this.myDataRef.child(person.$id).set({task:person.task,name:person.name});
    this.person=person;
  }

  remove(item)
  {
     var result=window.confirm("This action item will be deleted.Are you sure?");
      if(result)
{'fraction_non_alphanumeric': 0.1767885532591415, 'fraction_numerical': 0.0009538950715421304, 'mean_word_length': 3.1779548472775563, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7539719', 'n_tokens_mistral': 1064, 'n_tokens_neox': 1038, 'n_words': 136}