title: Angular: Access an external static class inside of a components template
body: <p>Lets say I have an angular component with the corresponding class.</p>
  
  <pre><code>@Component({
    selector: "test",
    template: `       whatever    `
  })
  
  export class TestComponent
  {}
  </code></pre>
  
  <p>And then I have a class with static members (bound to the class and not to an instance).</p>
  
  <pre><code>export class Config
  {
      public static foo () : string
      {  return "blabla"; }
  }
  </code></pre>
  
  <p>Is there a way I can call Config.foo in the template of my component?</p>
  
  <pre><code>template: ` {{ Config.foo () }} `
  </code></pre>
  
  <p>It works if I wrap it inside TestComponent and call that in my component.</p>
  
  <pre><code>template: `{{ myfoo () }}`
  ...
  export class TestComponent
  {
    myfoo ()
    { return Config.foo (); }
  }
  </code></pre>
  
  <p>But thats not what I want.</p>
  
  <p>Config should hold global config information and I do not want to wrap any piece of info in a lot of components.</p>
  
  <p>Or is there some more elegant way? I thought about injection (singleton) but I would prefer the static way more for stateless constant information.</p>
  
  <p>Thanks!</p>