Skip to content

Commit f9581dc

Browse files
authored
Merge pull request #697 from HS2-SOLUTIONS/master
Update examples to use string Angular dependency injection
2 parents c6b3456 + cdcbfe8 commit f9581dc

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

docs/jade/getstarted.jade

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ ol
3232

3333
li Set theme in app.run:
3434
pre.prettyprint.
35-
app.run(function(editableOptions) {
35+
app.run(['editableOptions', function(editableOptions) {
3636
editableOptions.theme = 'bs3'; // bootstrap3 theme. Can be also 'bs2', 'default'
37-
});
37+
}]);
3838

3939
li Markup element that should be editable
4040
pre.prettyprint(ng-non-bindable)

docs/jade/reference.jade

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,10 @@ h3 Options
100100
:markdown
101101
Options are set in app.run
102102
pre.prettyprint
103-
= 'app.run(function(editableOptions) {\n'
103+
= 'app.run([\'editableOptions\', function(editableOptions) {\n'
104104
= 'editableOptions.theme = \'bs3\';\n'
105105
= '...\n'
106-
= '});\n'
106+
= '}]);\n'
107107
- var items = ns.properties ? ns.properties.filter(function(v){return !~v.type.names.indexOf('attribute')}) : []
108108
+props(items)
109109

docs/jade/themes.jade

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
To change the `title` and `aria-label` values of the submit/cancel/clear buttons, set the `editableOptions` properties:
1111

1212
pre.prettyprint.
13-
app.run(function(editableOptions) {
13+
app.run(['editableOptions', function(editableOptions) {
1414
editableOptions.submitButtonTitle = 'Submit';
1515
editableOptions.submitButtonAriaLabel = 'Submit';
1616
editableOptions.cancelButtonTitle = 'Cancel';
1717
editableOptions.cancelButtonAriaLabel = 'Cancel';
1818
editableOptions.clearButtonTitle = 'Clear';
1919
editableOptions.clearButtonAriaLabel = 'Clear';
20-
});
20+
}]);
2121

2222
section#bootstrap3
2323
h2 Bootstrap 3
@@ -31,15 +31,15 @@ pre.prettyprint
3131
Set theme in `app.run`:
3232

3333
pre.prettyprint.
34-
app.run(function(editableOptions) {
34+
app.run(['editableOptions', function(editableOptions) {
3535
editableOptions.theme = 'bs3';
36-
});
36+
}]);
3737

3838
:markdown
3939
To have smaller or bigger controls modify `inputClass` and `buttonsClass` properties of theme:
4040

4141
pre.prettyprint.
42-
app.run(function(editableOptions, editableThemes) {
42+
app.run(['editableOptions', 'editableThemes', function(editableOptions, editableThemes) {
4343
editableThemes.bs3.inputClass = 'input-sm';
4444
editableThemes.bs3.buttonsClass = 'btn-sm';
4545
editableOptions.theme = 'bs3';
@@ -57,9 +57,9 @@ pre.prettyprint
5757
Set theme in `app.run`:
5858

5959
pre.prettyprint.
60-
app.run(function(editableOptions) {
60+
app.run(['editableOptions', function(editableOptions) {
6161
editableOptions.theme = 'bs2';
62-
});
62+
}]);
6363

6464
section#default
6565
h2 Default
@@ -68,13 +68,13 @@ h2 Default
6868
You can customize theme in `app.run` by overwriting properties:
6969

7070
pre.prettyprint.
71-
app.run(function(editableOptions, editableThemes) {
71+
app.run(['editableOptions', 'editableThemes', function(editableOptions, editableThemes)
7272
// set `default` theme
7373
editableOptions.theme = 'default';
7474

7575
// overwrite submit button template
7676
editableThemes['default'].submitTpl = '<button type="submit">ok</button>';
77-
});
77+
}]);
7878

7979
:markdown
8080
Available properties of each theme you can see in source

docs/js/app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ app.config(function($locationProvider) {
3232
});
3333
*/
3434

35-
app.run(function($rootScope, $httpBackend, editableOptions, editableThemes) {
35+
app.run(['editableOptions', '$httpBackend', 'editableOptions', 'editableThemes', function($rootScope, $httpBackend, editableOptions, editableThemes) {
3636
$rootScope.debug = {};
3737

3838
editableOptions.theme = 'bs3';
@@ -111,7 +111,7 @@ app.run(function($rootScope, $httpBackend, editableOptions, editableThemes) {
111111

112112
$httpBackend.whenGET(/\.(html|css|js)$/).passThrough();
113113

114-
});
114+
}]);
115115

116116
function isProd() {
117117
//return true;

0 commit comments

Comments
 (0)