title: Angular throw error $parse: ueoe Unexpected End of Expression
body: <p>This part of my site is with an error and i can't figure out, since i didn't change that in months.</p>
  
  <p>The error is:</p>
  
  <pre><code>Error: [$parse:ueoe] http://errors.angularjs.org/1.4.3/$parse/ueoe?p0=event._id%3FEventController
      at Error (native)
      at http://localhost:3000/scripts/libs.js:44598:416
      at Object.q.consume (http://localhost:3000/scripts/libs.js:44801:157)
      at Object.q.ternary (http://localhost:3000/scripts/libs.js:44794:497)
      at Object.q.assignment (http://localhost:3000/scripts/libs.js:44794:284)
      at Object.q.expression (http://localhost:3000/scripts/libs.js:44794:237)
      at Object.q.filterChain (http://localhost:3000/scripts/libs.js:44794:145)
      at Object.q.expressionStatement (http://localhost:3000/scripts/libs.js:44794:91)
      at Object.q.program (http://localhost:3000/scripts/libs.js:44793:458)
      at Object.q.ast (http://localhost:3000/scripts/libs.js:44793:257) &lt;li class="controller__item controller__item--disabled" data-controller-range="[1, 1]" data-event-sidebar-to="false" ng-click="event._id ? EventController.update(event._id, event) : EventController.create(event)"&gt;
  </code></pre>
  
  <p>According to angular.js:</p>
  
  <p>Error: $parse:ueoe
  Unexpected End of Expression
  Unexpected end of expression: event._id
  Description
  Occurs when an expression is missing tokens at the end of the expression. For example, forgetting a closing bracket in an expression will trigger this error.</p>
  
  <p>To resolve, learn more about Angular expressions, identify the error and fix the expression's syntax.</p>
  
  <p>The HTML template:</p>
  
  <pre><code>&lt;main class="main"&gt;
      &lt;div ng-include src="'/admin/navbar/navbar.template.html'"&gt;&lt;/div&gt;
      &lt;div ng-include src="'/admin/breadcrumb/breadcrumb.template.html'"&gt;&lt;/div&gt;
      &lt;section class="events"&gt;
          &lt;div class="events__container"&gt;
              &lt;div class="events__row"&gt;
                  &lt;div class="col-md-12"&gt;
                      &lt;div class="events__box"&gt;
                          &lt;div class="events__header"&gt;
                              &lt;h2 class="events__title"&gt; Todos os eventos - &lt;/h2&gt;
                          &lt;/div&gt;
                          &lt;div class="events__body"&gt;
                              &lt;table class="events__table" data-table&gt;
                                  &lt;!-- directive:table-sorter-directive --&gt;
                                  &lt;thead&gt;
                                      &lt;tr&gt;
                                          &lt;th class="events__th events__th--all"&gt;
                                              &lt;input type="checkbox" /&gt;
                                          &lt;/th&gt;
                                          &lt;th class="events__th"&gt; Nome &lt;/th&gt;
                                          &lt;th class="events__th"&gt; Data &lt;/th&gt;
                                          &lt;th class="events__th events__th--reservations"&gt; Reservas &lt;/th&gt;
                                      &lt;/tr&gt;
                                  &lt;/thead&gt;
                                  &lt;tbody&gt;
                                      &lt;tr class="events__tr" ng-repeat="event in events"&gt;
                                          &lt;td class="events__td events__td--checkbox"&gt;
                                              &lt;input type="checkbox" data-controller-input ng-click="EventController.retrieveOne(event._id)"/&gt;
                                          &lt;/td&gt;
                                          &lt;td class="events__td"&gt; {{ event.name }} &lt;/td&gt;
                                          &lt;td class="events__td"&gt; {{ event.date }} &lt;/td&gt;
                                          &lt;td class="events__td events__td--reservations"&gt; 50 &lt;/td&gt;
                                      &lt;/tr&gt;
                                  &lt;/tbody&gt;
                              &lt;/table&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;aside class="events__sidebar" data-event-sidebar&gt;
                  &lt;!-- directive:event-sidebar-directive  --&gt;
                  &lt;form class="events__sidebar-form" method="POST" action="#"&gt;
                      &lt;div class="events__sidebar-group"&gt;
                          &lt;label class="events__sidebar-label" for="event_value"&gt; Valores: &lt;/label&gt;
                          &lt;input class="events__sidebar-input event__sidebar-input--value" type="text" id="event_value" ng-model="event.men"/&gt;
                          &lt;input class="events__sidebar-input event__sidebar-input--value" type="text" id="event_value" ng-model="event.women"/&gt;
                      &lt;/div&gt;
                      &lt;div class="events__sidebar-group"&gt;
                          &lt;label class="events__sidebar-label" for="event_name"&gt; Nome do evento: &lt;/label&gt;
                          &lt;input class="events__sidebar-input" type="text" id="event_name" ng-model="event.name"/&gt;
                      &lt;/div&gt;
                      &lt;div class="events__sidebar-group"&gt;
                          &lt;label class="events__sidebar-label" for="event_hour"&gt; Hora: &lt;/label&gt;
                          &lt;input class="events__sidebar-input" type="text" id="event_hour" ng-model="event.hour"/&gt;
                      &lt;/div&gt;
                      &lt;div class="events__sidebar-group"&gt;
                          &lt;label class="events__sidebar-label" for="event_point"&gt; Ponto de encontro: &lt;/label&gt;
                          &lt;input class="events__sidebar-input" type="text" id="event_point" ng-model="event.meeting"/&gt;
                      &lt;/div&gt;
                      &lt;div class="events__sidebar-group"&gt;
                          &lt;label class="events__sidebar-label" for="event_info"&gt; Informações simples: &lt;/label&gt;
                          &lt;input class="events__sidebar-input" type="text" id="event_info" placeholder="1 Hora de Open Bar + 2 horas de loucura"/&gt;
                      &lt;/div&gt;
                      &lt;div class="events__sidebar-group"&gt;
                          &lt;label class="events__sidebar-label" for="event_hiw"&gt; Como funciona: &lt;/label&gt;
                          &lt;input class="events__sidebar-input" type="text" id="event_hiw" ng-model="event.hiw"/&gt;
                      &lt;/div&gt;
                  &lt;/form&gt;
              &lt;/aside&gt;
          &lt;/div&gt;
      &lt;/section&gt;
      &lt;aside class="controller" data-controller&gt; 
          &lt;!-- directive:controller-directive --&gt;
          &lt;!-- directive:controller-action-directive  --&gt;
          &lt;div class="controller__controller" data-controller-indicator&gt;
              &lt;i class="icon icon__cogs"&gt;&lt;/i&gt;
          &lt;/div&gt;
          &lt;div class="controller__container"&gt;
              &lt;ul class="controller__list"&gt;
                  &lt;li class="controller__item"                            data-controller-range="[0]" data-event-sidebar-to="true" ng-click="EventController.clean()"&gt;
                      &lt;i    class="icon icon__plus icon__2x"&gt;&lt;/i&gt;
                      &lt;span class="controller__legend"&gt; Novo &lt;/span&gt;
                  &lt;/li&gt;
                  &lt;li class="controller__item controller__item--disabled" data-controller-range="[1, 1]" data-event-sidebar-to="true"&gt;
                      &lt;i    class="icon icon__pencil icon__2x"&gt;&lt;/i&gt;
                      &lt;span class="controller__legend"&gt; Editar &lt;/span&gt;
                  &lt;/li&gt;
                  &lt;li class="controller__item controller__item--disabled" data-controller-range="[1, 1]" data-event-sidebar-to="false" ng-click="event._id ? EventController.update(event._id, event) : EventController.create(event)"&gt;
                      &lt;i    class="icon icon__cloud icon__2x"&gt;&lt;/i&gt;
                      &lt;span class="controller__legend"&gt; Salvar &lt;/span&gt;
                  &lt;/li&gt;
                  &lt;li class="controller__item controller__item--disabled" data-controller-range="[1]" data-event-sidebar-to="false" ng-click="EventController.delete(event._id)"&gt;
                      &lt;i    class="icon icon__trash icon__2x"&gt;&lt;/i&gt;
                      &lt;span class="controller__legend"&gt; Deletar &lt;/span&gt;
                  &lt;/li&gt;
                  &lt;li class="controller__item controller__item--email"&gt;
                      &lt;i    class="icon icon__search icon__2x"&gt;&lt;/i&gt;
                      &lt;span class="controller__legend"&gt; E-mail &lt;/span&gt;
                  &lt;/li&gt;
                  &lt;li class="controller__item controller__item--search"&gt;
                      &lt;i    class="icon icon__envelope icon__2x"&gt;&lt;/i&gt;
                      &lt;span class="controller__legend"&gt; Pesquisar &lt;/span&gt;
                  &lt;/li&gt;
              &lt;/ul&gt;
          &lt;/div&gt;
      &lt;/aside&gt;
  &lt;/main&gt;
  </code></pre>
  
  <p>EventController.js:</p>
  
  <pre><code>'use strict';
  var EventController = function(scope, EventModel) {
      this.scope      = scope;
      this.EventModel = EventModel;
      this.scope.store = [];
  
      this.retrieve();
  };
  
  EventController.prototype = {
      clean: function() {
          this.scope.event = {};
      },
  
      create: function(newEvent) {
          this.EventModel.Model.insert(newEvent)
              .then(function(result) {
  
              });
      },
  
      retrieve: function() {
          var that = this;
  
          this.EventModel.Model.find()
              .then(function(result) {
                  that.scope.events = result;
              });
      },
  
      retrieveOne: function(eventId) {
          var that = this;
  
          this.EventModel.Model.findOne(eventId)
              .then(function(result) {
                  that.scope.event = result;
              });
      },
  
      update: function(editedEvent, event) {
          this.EventModel.Model.update(editedEvent, event)
              .then(function(result) {
  
              });
      },
  
      delete: function(eventId) {
          this.EventModel.Model.remove(eventId)
              .then(function(result) {
  
              });
      }
  };
  
  angular.module('adminApp').controller('EventController', ['$scope', 'EventModel', EventController]);
  </code></pre>
  
  <p>I can't figure out what is the problem. Anybody can help?</p>
  
  <p>Thanks.</p>