Suppose you are using routes:
// bootstrap myApp.config(['$routeProvider', '$locationProvider', function ($routeProvider, $locationProvider) { $routeProvider.when('/home', { templateUrl: 'partials/home.html', controller: 'HomeCtrl' }); $routeProvider.when('/about', { templateUrl: 'partials/about.html', controller: 'AboutCtrl' }); ... And in your html, you want to navigate to the about page when a button is clicked. One way would be
<a href="#/about"> ... but it seems ng-click would be useful here too.
- Is that assumption correct? That ng-click be used instead of anchor?
- If so, how would that work? IE:
<div ng-click="/about">