title: Angular2 two functions in NgStyle
body: <p>I want to set two functions in ngStyle. I've tried <code>[ngStyle]="setAlignmentStyle(element.alignment);setShapeStyle(element.shape);"</code> but it gives template parse errors. </p>
  
  <p>How should I set two functions in ngStyle?</p>
  
  <p><strong>page.component.ts</strong></p>
  
  <pre class="lang-js prettyprint-override"><code>export class PageComponent {
  
      // ...
  
      setAlignmentStyle(alignment) {
          let styles = {
              'margin': alignment === 'center' ? '0 auto' : '',
              'float': alignment === 'right' ? 'right' : (alignment === 'left' ? 'left' : ''),
          };
          return styles;
      }
  
      setShapeStyle(shape) {
          let styles = {
              'border-radius': shape === 'circle' ? '50%' : '',
          };
          return styles;
      }
  }
  </code></pre>
  
  <p><strong>page.component.html</strong></p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div [ngStyle]="setAlignmentStyle(element.alignment);setShapeStyle(element.shape);"&gt;{{element.text}}&lt;/div&gt;
  </code></pre>