Say I have a string that contains a value of "HOMEPAGE"

```
vm.string = "HOMEPAGE"

```

and I want to perform an ng-if inside of a div that causes it to display if vm.string is equal to one of these five strings.

```
"HOMEPAGE"
"ABOUT"
"STORE"
"EXAMPLE"
"SOMETHING"

```

I could do this using or operators inside of the ng-if to achieve the desired effect

```
<div ng-if="WhateverController.string == 'HOMEPAGE'
    || WhateverController.string == 'ABOUT'
    || WhateverController.string == 'STORE'
    || WhateverController.string == 'EXAMPLE'
    || WhateverController.string == 'SOMETHING'">

This will display because the string is 'HOMEPAGE'

</div>

```

I could also do this by creating a function that returns a boolean in my controller.

```
vm.isTrue = function () {

    return (vm.string == 'HOMEPAGE'
        || vm.string == 'ABOUT'
        || vm.string == 'STORE'
        || vm.string == 'EXAMPLE'
        || vm.string == 'SOMETHING');

};

<div ng-if="WhateverController.isTrue">
This will display because the string is 'HOMEPAGE'
</div>

```

My question to you all is which of these two methods is considered the more "angular" way? I'm partial to doing this inside of the javascript because it makes the HTML look cleaner, but I am curious as to whether there is one way preferred over the other and why.