Skip to content

Commit 6c050fc

Browse files
committed
Changed some parameters on directive to make their values dynamic.
1 parent 53c37e1 commit 6c050fc

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

app/scripts/directives/oauth.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ directives.directive('oauth', function(AccessToken, Endpoint, Profile, $location
99
replace: true,
1010
scope: {
1111
site: '@', // (required) set the oauth server host (e.g. http://oauth.example.com)
12-
clientId: '@', // (required) client id
13-
redirectUri: '@', // (required) client redirect uri
12+
clientId: '=', // (required) client id
13+
redirectUri: '=', // (required) client redirect uri
1414
responseType: '@', // (optional) response type, defaults to token (use 'token' for implicit flow and 'code' for authorization code flow
1515
scope: '@', // (optional) scope
16-
profileUri: '@', // (optional) user profile uri (e.g http://example.com/me)
16+
profileUri: '=', // (optional) user profile uri (e.g http://example.com/me)
1717
template: '@', // (optional) template to render (e.g views/templates/default.html)
1818
text: '@', // (optional) login text
1919
authorizePath: '@', // (optional) authorization url

dist/oauth-ng.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* oauth-ng - v0.3.6 - 2014-12-03 */
1+
/* oauth-ng - v0.3.6 - 2014-12-08 */
22

33
'use strict';
44

@@ -304,11 +304,11 @@ directives.directive('oauth', function(AccessToken, Endpoint, Profile, $location
304304
replace: true,
305305
scope: {
306306
site: '@', // (required) set the oauth server host (e.g. http://oauth.example.com)
307-
clientId: '@', // (required) client id
308-
redirectUri: '@', // (required) client redirect uri
307+
clientId: '=', // (required) client id
308+
redirectUri: '=', // (required) client redirect uri
309309
responseType: '@', // (optional) response type, defaults to token (use 'token' for implicit flow and 'code' for authorization code flow
310310
scope: '@', // (optional) scope
311-
profileUri: '@', // (optional) user profile uri (e.g http://example.com/me)
311+
profileUri: '=', // (optional) user profile uri (e.g http://example.com/me)
312312
template: '@', // (optional) template to render (e.g bower_components/oauth-ng/dist/views/templates/default.html)
313313
text: '@', // (optional) login text
314314
authorizePath: '@', // (optional) authorization url

test/spec/directives/oauth.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ describe('oauth', function() {
2525
element = angular.element(
2626
'<span class="xyze-widget">' +
2727
'<oauth ng-cloak site="http://example.com"' +
28-
'client="client-id"' +
29-
'redirect="http://example.com/redirect"' +
28+
'client="\'client-id\'"' +
29+
'redirect="\'http://example.com/redirect\'"' +
3030
'scope="scope"' +
31-
'profile-uri="http://example.com/me">Sign In</oauth>' +
31+
'profile-uri="\'http://example.com/me\'">Sign In</oauth>' +
3232
'</span>'
3333
);
3434
});

0 commit comments

Comments
 (0)