I'm diving into the world of JavaScript and AngularJS. I've encountered an issue. Specifically, I'm trying to figure out how to remove the h1 tag when navigating to the /main route. I believe I need to utilize ng-if
with an expression involving the $location
object in the controller.
<html>
<body>
...
<h1 ng-if "? ">
sometext
</h1>
<div ng-view></div>
</body>
...
</html>
Could someone help me determine the correct expression to achieve this? Or should I create a function within the controller to handle this task? Thank you for any assistance.