title: How to pass object literal to a filter from the view in Angular?
body: <p>I would like to be able to pass a config object literal to my filter from the view. To do so, I added a second, optional parameter to my filter. I can pass an object literal to the filter, if I define it in the controller, however the code breaks if I try to define an object in the view.</p>
  
  <pre><code>$scope.message = 'Hello World';
  $scope.configObj = {uppercase: true, exclamationMarks: 5};
  
  &lt;p&gt;OK {{message | shoutFilter}}&lt;/p&gt;
  &lt;p&gt;OK {{message | shoutFilter:configObj}}&lt;/p&gt;
  &lt;p&gt;ERROR {{message | shoutFilter:{'exclamationMarks':2}}}&lt;/p&gt;
  </code></pre>
  
  <p>You can see a pretty contrived example here: <a href="https://jsbin.com/rojekitixo/1/edit?html,js,console,output" rel="nofollow">https://jsbin.com/rojekitixo/1/edit?html,js,console,output</a></p>
  
  <p>I got an error message:</p>
  
  <pre><code>Error: [$parse:ueoe] http://errors.angularjs.org/1.4.0/$parse/ueoe?p0=message%20%7C%20shoutFilter%3A%7BexclamationMarks%3A2
  </code></pre>