title: AngularJs custom directive isolated scope custom fields
body: <p>How can I add custom fields to angular scope along with passed fields as attributes, as the following:</p>
  
  <pre><code>angular.module('app')
      .directive("myDirective", function(){
          function NewObj()
          {
              this.id = 0;
              this.name = "";
          }
          return{
              restrict: "E",
              templateUrl:"partials/directives/temp.html",
              scope:{
                      viewId:"=",
                      dataObj: new NewObj() //This is the custom obj
                    }
  
               }
          }
  </code></pre>
  
  <hr>
  
  <p>When I do so, I get invalid isolated scope definition.
  How can this be accomplised ?</p>