Using AngularJS in App With Multiple Endpoints -


i learning angularjs. have basic web app has 3 screens. 3 screens are: home, product listings, , product. "home" screen basic welcome screen. "product listings" screen show list of dozens of products. each product can seen in greater detail selecting on products page. there, shown more details in "product" view. navigate around app, want use ng-view provide smooth animation between pages.

my files arranged follows:

index.html index.html.js views   home.html   products.html   product.html 

when user uses app, may enter 2 different locations. may start app visiting http://www.mysite.com or http://www.mysite.com/products/{productid}. productid dynamic value. when user navigates http://www.mysite.com, know how working. however, challenge dealing scenario visits product , building other way.

does know how create angular app user may enter via either root of app or leaf node of sitemap? essentially, have site multiple endpoints. thank you!

are using $route / $routeprovider? check them out here: http://docs.angularjs.org/tutorial/step_07

i take @ yeoman build starter app you.

http://yeoman.io

with yeoman can create scaffold app using best practices installing generator-angular generator yeoman - it's there on site under 'getting started'.


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -