ngRoute is what is usually used. It allows multiple views within a single page, and uses the URL to keep state so that the back/forward buttons work.
https://docs.angularjs.org/api/ngRoute On Wednesday, February 4, 2015 at 5:59:15 PM UTC-6, Geoff Swartz wrote: > > I'm brand new to angular but from what I've seen so far it appears that > your application needs to run on an html page so for another part of the > app to run, you navigate as you would in any other type of web site. In my > case, I'm looking to develop an app with multiple views/templates which > will be run on a site similar to a jquery plugin. Below is some pseudo > code to illustrate > > Main Web Page on customersite.com > > <html><head> > <script src="mysite.com/application.js"></script> > <script> > window.onload = function(){ app = new myapp(); app.init('content');} > </script> > <body> > <div id="content"></div> > </body> > </html> > > > application.js on mysite.com > > var myapp = function(){ > this.init = function(div){ > load my app in the div passed in > } > } > > > So, the intention is to leave the page on customersite.com with minimal > script and html and all the logic along with the templates are handled by > the application.js file on my site. Is this possible to do with angular? > Thanks. > -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
