What attributes can I use in ngView to display the template for the current route?

I’m learning AngularJS and one of the assignments reads like this:

Now, add a new div tag to our index.html with an attribute directive that
will include the rendered template for the current route.

That is, I need to put something inside the following div, which will render the correct (according to routes) template.

<div class="main-wrapper">

</div>

In all examples that I could find, this task is solved by putting <ng-view/> into the HTML code.

But this answer is wrong.

How else can I implement it (render the template, which corresponds to the current route) ?


Source: javascript

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.