title: Check for empty angular object in html
body: <p>Im trying to disable a button on a condition whether an object is empty or not. In this case the object <em><strong>selectedTopics</strong></em> should be equal to {}</p>
  <p><strong>register.ts</strong></p>
  <pre><code>ngOnInit() {
      this.topicRequestAnswer = {topics:[]};
  
      this.selectedTopics = {};  // &lt;- setting equal to {} here
      this.requestTopics();
    }
  </code></pre>
  <hr />
  <p><strong>register.html</strong></p>
  <pre><code>&lt;ion-content class=&quot;ion-padding&quot;&gt;
  
    &lt;form #form=&quot;ngForm&quot; (ngSubmit)=&quot;register(form)&quot;&gt;
      &lt;ion-grid&gt;
        &lt;ion-row color=&quot;primary&quot; class=&quot;ion-justify-content-center&quot;&gt;
          &lt;ion-col class=&quot;ion-align-self-center&quot; size-md=&quot;6&quot; size-lg=&quot;5&quot; size-xs=&quot;12&quot;&gt;
            &lt;div class=&quot;ion-text-center&quot;&gt;
              &lt;h3&gt;...&lt;/h3&gt;
            &lt;/div&gt;
            &lt;div class=&quot;ion-padding&quot;&gt;
              &lt;ion-item&gt;
                &lt;ion-input [(ngModel)]=&quot;email&quot; name=&quot;email&quot; type=&quot;email&quot; placeholder=&quot;E-Mail&quot; ngModel required&gt;&lt;/ion-input&gt;
              &lt;/ion-item&gt;
              &lt;ion-item&gt;
                &lt;ion-label&gt;Choose a topic&lt;/ion-label&gt;
                &lt;ion-select [(ngModel)]=&quot;selectedTopics&quot; name=&quot;topics&quot; multiple=&quot;true&quot; ngModel required&gt;
                  &lt;ion-select-option *ngFor=&quot;let topic of topicRequestAnswer.topics&quot; value=&quot;{{topic}}&quot; class=&quot;ion-text-justify&quot; ngModel required&gt;{{topic}}&lt;/ion-select-option&gt;
                &lt;/ion-select&gt;
              &lt;/ion-item&gt;
              &lt;ion-item&gt;
                &lt;ion-input [(ngModel)]=&quot;name&quot; name=&quot;username&quot; type=&quot;username&quot; placeholder=&quot;Username&quot; ngModel required&gt;&lt;/ion-input&gt;
              &lt;/ion-item&gt;
              &lt;ion-item&gt;
                &lt;ion-input [(ngModel)]=&quot;password&quot; name=&quot;password&quot; type=&quot;password&quot; placeholder=&quot;Password&quot; ngModel required&gt;&lt;/ion-input&gt;
              &lt;/ion-item&gt;
            &lt;/div&gt;
            &lt;div class=&quot;ion-padding&quot;&gt;
              &lt;ion-button size=&quot;large&quot; type=&quot;submit&quot; [disabled]=&quot;form.invalid || selectedTopics == {}&quot; expand=&quot;block&quot;&gt;Sign Up&lt;/ion-button&gt;  // &lt;- the [disabled] condition fails here
            &lt;/div&gt;
          &lt;/ion-col&gt;
        &lt;/ion-row&gt;
      &lt;/ion-grid&gt;
    &lt;/form&gt;
  </code></pre>
  
  <hr />
  <p>The output im getting in my php script when I echo the empty $topics variable is</p>
  <pre><code>[object Object]
  </code></pre>
  <hr />
  <p>How do I need to change the condition in order to disable the button in case no topics were selected?</p>