My buttons in the nav bar are not working. This includes:
create item (top left corner) should lead to new inputs page
clicking on app name should lead to main page
clicking on user name should go to another page
I tried shifting the ions-nav-bar, ion-nav-view or ion-views around to changing states from href to ui-sref and nothing works. I think i need a new controller for a new post?
The examples on the website are also very very brief. Please kindly help?
Thanks!
The end header now looks like this.
This is the navbar html
<ion-nav-view>
<ion-view ng-controller="NavCtrl">
<ion-nav-bar></ion-nav-bar>
<ion-nav-buttons side="left" ng-submit="submitPost()">
<button class="button button-icon ion-compose" href='/tab/newpost'></button>
*<!-- the furthest I got was to shift down submitPost() as ng-click="submitPost() to the ion-nav-button but it does not go to the new page -->*
<button class="button-clear" href='#/tab/posts'><b>MyApp</b></button>
</ion-nav-buttons>
<ion-nav-buttons side="right">
<button class="button-clear" href="#/users/{{ currentUser.username }}">
<img ng-src="http://www.gravatar.com/avatar/{{ currentUser.md5_hash }}" class="nav-pic"/>{{ currentUser.username }}
</button>
<button class="button button-icon ion-log-out" ng-click="logout()"></button>
</ion-nav-buttons>
The formatting cleared a fair bit but buttons are still not working.
I noticed because I was missing a controller to bring me to another page on a click of a button. I searched around but nothing mentioned on how to combine ui-router and ng-click (or other methods i should use).
I understand some stuff may be outside of Ionic but if u do have a suggestion/s, Ill be happy to hear esp on the controller codes.
Ok here you go, Im not too sure how the pen works so perhaps you could give some pointers. When i click on the button, the posts page navbar dissappears but is not replaced by anything while the body has no changes.
Are there any better ways of doing this? I tried [a href bla] but it isnt working
Just as a reference and contrast, this guys shows that using all 3 ways, the link can be done so Im not sure whats missing in mine? 3 examples for routing on Codepen
ctrl shift J doesnt show any errors in the console tab, neither does Batarang.
Not removing Auth and Post, the test message that you devised pops up on my local version which meant it worked!. So possibly it might be the $scope.create portion to replace the alert that might be wrong?