How to use AngularJs ui-view and ng-view together in a single project

I have a project where if i click on any link the view should change but the link should not change which i can achieve by using angular ui-route by state change. Also if i enter any view name in url that should also work, this can by achieve by using view-route.

In simple term if my url is then the link should not change even if the view change lets say i go to contact, then also the link should be But if i type ,then i should be redirect to contact page.

I am not able to achieve this as i think that its two different routing mechanism.

Kindly help me on this, as to how we can achieve this.

Thanks in advance.

1 answer

  • answered 2017-12-11 09:01 Zooly

    UI-Router official documentation tells one thing about that:

    Issue: Problems when using ng-view alongside ui-view

    Don't do that. You can use some thing like ng-include to assemble your page.