Help with a Custom Filter?

I’ve been playing with HAB Panel and it seems great so far.

But how do we expand on it (via filters and functions)?

Here’s a “simple” hello world that I thought would work, but I can’t seem to make it say “Hello World”…can somebody help?

Thanks!~

<script>
var app = angular.module('app', []);

app.filter('makeUppercase', function () {
  return function (item) {
      return item.toUpperCase();
  };
});
</script>

<p>
  <div ng-app="app">
      {{ "Hello World" | makeUppercase }}
  </div>
 </p>

Your main problem is this:


Allowing inline scripts in templates would be a security nightmare, so it isn’t allowed. Injecting a custom controller for the template widget might be considered at some point, but probably not in the next weeks/months.

How do I make a custom filter for HAB Panel ? (What file do I edit so I can include my own .js files?)

I haven’t tried this yet, but coudl it work in theory??

What if I modified the web/index.html (from the habpanel jar file) to include my own custom js file? Would habpanel still work?

(Yes I know that when habpanel is updated I’d have to change the jar file again, but would it work?)

In that case you should clone the GitHub repository in your static files (conf/html), make a branch, modify the source and go to your modified version at /static/habpanel/web/index.html.
And if your change would be useful to others, why not submit a pull request!

I would be interested in this feature. Should it work in the latest release?