Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,9 @@ <h2>Activate the HTML5 mode</h2>
</p>

<pre><code><xmp>// app/scripts/app.js
angular.module('newProjectApp').config(function($locationProvider) {
angular.module('newProjectApp').config(['$locationProvider', function($locationProvider) {
$locationProvider.html5Mode(true).hashPrefix('!');
});</xmp></code></pre>
}]);</xmp></code></pre>

<h2 id="server">OAuth 2.0 Server</h2>

Expand Down Expand Up @@ -340,9 +340,9 @@ <h2>HTML5 mode ON</h2>
<p>The oauth directive works just straight when the <a href="https://docs.angularjs.org/guide/$location#general-overview-of-the-api">HTML5 mode</a> is active.</p>

<pre><code><xmp><script>
angular.module('app').config(function($locationProvider) {
angular.module('app').config(['$locationProvider', function($locationProvider) {
$locationProvider.html5Mode(true).hashPrefix('!');
});</script></xmp></code></pre>
}]);</script></xmp></code></pre>


<h2>HTML5 mode OFF</h2>
Expand All @@ -356,12 +356,12 @@ <h2>HTML5 mode OFF</h2>
$routeProvider
.when('/access_token=:accessToken', {
template: '',
controller: function ($location, AccessToken) {
controller: ['$location', 'AccessToken', function($location, AccessToken) {
var hash = $location.path().substr(1);
AccessToken.setTokenFromString(hash);
$location.path('/');
$location.replace();
}
}]
})
...</xmp></code></pre>

Expand Down