You can try:
Replace contacts-view.html with:
<section id="contacts-list"> <h1>This is a list of contacts</div> <article class="contacts" ng-repeat="contact in contacts">(...)</article> <h2>{{ contact.name }}</h2> </section>
and in your contacts.html write:
<section id="contacts-list" ui-view> <h1>This is a list of contacts</div> <article class="contacts" ng-repeat="contact in contacts">(...)</article> </section>
This should do the trick if you don't mind repeating code in your templates.
Edit:
Now I understand that you want to do a little more:
What about:
<section id="contacts-list" ng-class="{ detail: $state.is('contacts.view')> <h1>This is a list of contacts</div> <article class="contacts" ng-repeat="contact in contacts">(...)</article> <ui-view /> </section>
And then you add the add / remove animation classes to the part class. This should work without having to repeat or add / remove unnecessary elements in the DOM.
source share