Multiple views

41 views
Skip to first unread message

mark goldin

unread,
Sep 17, 2014, 4:31:50 PM9/17/14
to ang...@googlegroups.com
Is there a good example that would show how to have multiple views loaded together?
I've tried going thru this:
But couldn't get the whole concept. Plus, did not find a complete example for named views.

Thanks

Mark Volkmann

unread,
Sep 17, 2014, 4:56:06 PM9/17/14
to ang...@googlegroups.com
I have an example in a talk I gave on this. See http://www.youtube.com/watch?v=1aGf-Rze1jE

--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.



--
R. Mark Volkmann
Object Computing, Inc.

mark goldin

unread,
Sep 18, 2014, 6:32:53 AM9/18/14
to ang...@googlegroups.com
Excellent presentation! Do you have a source code available by any chance?

Thanks

--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/NRQJwFNkpeo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.

Mark Volkmann

unread,
Sep 18, 2014, 9:58:02 AM9/18/14
to ang...@googlegroups.com
Yes. All the example code from my AngularJS class, including ui-router, is here: http://github.com/mvolkmann/angularjs-examples

R. Mark Volkmann
Object Computing, Inc.

mark goldin

unread,
Sep 18, 2014, 10:00:12 AM9/18/14
to ang...@googlegroups.com
Thanks a lot, will look into it.

mark goldin

unread,
Sep 18, 2014, 12:54:54 PM9/18/14
to ang...@googlegroups.com
Well, I've tried to create my solution based on your examples but couldn't get working code. Hope, you can help me out. I am going after the siblings example.

Here is relative code:
index.html
....
<li><a sref="first">&nbsp;Reports</a></li>
.....
<div>
        <div ui-view="upper"></div>
        <div ui-view="lower"></div>
</div>
app.js
app.config(function ($stateProvider, $urlRouterProvider) {
    $stateProvider
      .state('first', {
        url: '',
        views: {
          upper: {
            templateUrl: 'app/views/first.html'
          },
          lower: {
            templateUrl: 'app/views/second.html'
          }
        }
      })
      
  });

when I load index.html I get both pages loaded. But what I want is to load these two pages when I click on a list. Can you please help?

Thanks
Reply all
Reply to author
Forward
0 new messages