title: Why does variable substitution not work for my case?
body: <p>I'm trying to create a custom widget using templates, but variable substitution does not seem to be working for me.  </p>
  
  <p>I can see the property value being updated inside the widget, but the DOM does not change. For example, when I use the get() method, I can see the new value of the widget's property. However, the DOM never changes its value.</p>
  
  <p>Here is my template:</p>
  
  <pre><code>&lt;div class="outerContainer"&gt;
      &lt;div class="container"&gt;
          &lt;span class="mySpan"&gt;My name is ${name}&lt;/span&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Now, here is my widget code:</p>
  
  <pre><code>define([
      "dojo/_base/declare",
      "dijit/_WidgetBase",
      "dijit/_TemplatedMixin",
      "dojo/text!/templates/template.html",
  ], function (declare, _WidgetBase, _TemplatedMixin, template) {
      return declare([_WidgetBase, _TemplatedMixin], {
          templateString: template,
          name: "",
  
          constructor: function (args) {
              console.log("calling constructor of the widget");
              this.name = args.name;
          },
  
          startup: function() {
              this.inherited(arguments);
              this.set("name", "Robert");  // this does not work
          },
  
          postCreate: function() {
              this.inherited(arguments);
              this.set("name, "Robert");   // this does not work either
          },
  
          _setNameAttr: function(newName) {
              // I see this printed in the console.  
              console.log("Setting name to " + newName);
              this._set("name", newName);
  
              // I also see the correct value when I get()
              console.log(this.get("name"));  // This prints Robert
          }
      });
  });
  </code></pre>
  
  <p>I was expecting the DOM node to say "My name is Robert" i.e. the new value, but it never updates. Instead, it reads "My name is ". It does not overwrite the default value.</p>
  
  <p>I'm sure I'm missing a silly step somewhere, but can someone help me figure out what?</p>