posted 8 years ago
I'm consuming an API and have an ng-view in my app that displays 2 views based on the routes. I've cloned the angular-seed repository and wish to build upon it.
I have two different views that I want to route through. "Show" that is based on view1.js and "Ask" that is based on view2.js.
What my problem is that when I fire up the browser and request index.html it should have shown "Show" details as it is declared as such in the "otherwise" clause. But subsequently after a few seconds "Ask" request is also fired and here is where I'm confused as to why it is doing this. Also clicking on links for views in index.html also does not seem to respond and direct me to a view.
Could anyone let me know where I'm going wrong?
Code pasted below. view2.js and view2.html templates not included here as they are more or less same as its view1 counterpart.
app.js
index.html
view1.js
view1.html