Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 8e26750

Browse files
committed
chore(docs): re-skin main documentation
1 parent d015945 commit 8e26750

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+2753
-2724
lines changed

Rakefile

+9-6
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ task :compile => [:init, :compile_scenario, :compile_jstd_scenario_adapter] do
9090

9191
concat_module('resource', ['src/ngResource/resource.js'])
9292
concat_module('cookies', ['src/ngCookies/cookies.js'])
93+
concat_module('bootstrap', ['src/bootstrap/bootstrap.js'])
94+
concat_module('bootstrap-prettify', ['src/bootstrap/bootstrap-prettify.js',
95+
'src/bootstrap/google-prettify/prettify.js'],
96+
gen_css('src/bootstrap/google-prettify/prettify.css', true))
9397

9498

9599
FileUtils.cp 'src/ngMock/angular-mocks.js', path_to('angular-mocks.js')
@@ -99,6 +103,8 @@ task :compile => [:init, :compile_scenario, :compile_jstd_scenario_adapter] do
99103
closure_compile('angular-loader.js')
100104
closure_compile('angular-resource.js')
101105
closure_compile('angular-sanitize.js')
106+
closure_compile('angular-bootstrap.js')
107+
closure_compile('angular-bootstrap-prettify.js')
102108

103109
end
104110

@@ -159,10 +165,7 @@ task :package => [:clean, :compile, :docs] do
159165
"#{pkg_dir}/docs-#{NG_VERSION.full}/index-jq-debug.html"
160166
].each do |src|
161167
rewrite_file(src) do |content|
162-
content.sub!('angular.js', "angular-#{NG_VERSION.full}.js").
163-
sub!('angular-resource.js', "angular-resource-#{NG_VERSION.full}.js").
164-
sub!('angular-cookies.js', "angular-cookies-#{NG_VERSION.full}.js").
165-
sub!('angular-sanitize.js', "angular-sanitize-#{NG_VERSION.full}.js")
168+
content.gsub!(/'angular(.*)\.js/, '\'angular\1-' + NG_VERSION.full + '.js')
166169
end
167170
end
168171

@@ -305,8 +308,8 @@ def concat_file(filename, deps, footer='')
305308
end
306309

307310

308-
def concat_module(name, files)
309-
concat_file('angular-' + name + '.js', ['src/module.prefix'] + files + ['src/module.suffix'])
311+
def concat_module(name, files, footer='')
312+
concat_file('angular-' + name + '.js', ['src/module.prefix'] + files + ['src/module.suffix'], footer)
310313
end
311314

312315

angularFiles.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ angularFiles = {
5959
'src/ng/directive/ngView.js',
6060
'src/ng/directive/script.js',
6161
'src/ng/directive/select.js',
62-
'src/ng/directive/style.js'
62+
'src/ng/directive/style.js',
6363
],
6464

6565
'angularSrcModules': [
@@ -68,7 +68,9 @@ angularFiles = {
6868
'src/ngSanitize/sanitize.js',
6969
'src/ngSanitize/directive/ngBindHtml.js',
7070
'src/ngSanitize/filter/linky.js',
71-
'src/ngMock/angular-mocks.js'
71+
'src/ngMock/angular-mocks.js',
72+
73+
'src/bootstrap/bootstrap.js'
7274
],
7375

7476
'angularScenario': [
@@ -96,6 +98,7 @@ angularFiles = {
9698
'test/ngScenario/jstd-scenario-adapter/*.js',
9799
'test/*.js',
98100
'test/auto/*.js',
101+
'test/bootstrap/*.js',
99102
'test/ng/*.js',
100103
'test/ng/directive/*.js',
101104
'test/ng/filter/*.js',

docs/content/api/index.ngdoc

+3-59
Original file line numberDiff line numberDiff line change
@@ -2,62 +2,6 @@
22
@name API Reference
33
@description
44

5-
## Angular Compiler API
6-
7-
* {@link angular.module.ng.$compileProvider.directive Directives} - Angular DOM element attributes
8-
* {@link angular.module.ng.$filter Filters} - Angular output filters
9-
* {@link angular.module.ng.$compile $compile} - Template compiler
10-
11-
## Angular Scope API
12-
13-
* {@link angular.module.ng.$rootScope.Scope Scope Object} - Angular scope object
14-
15-
16-
## Angular Services & Dependency Injection API
17-
18-
* {@link angular.module.ng Angular Services}
19-
* {@link angular.injector angular.injector() }
20-
21-
22-
## Angular Testing API
23-
24-
* {@link angular.module.ngMock Testing Mocks API} - Mock objects for testing
25-
* {@link guide/dev_guide.e2e-testing Angular Scenario Runner} - Automated scenario testing
26-
documentation
27-
28-
29-
## Angular Utility Functions
30-
31-
### HTML & DOM Manipulation
32-
33-
* {@link angular.element angular.element()}
34-
35-
### Misc
36-
37-
* {@link angular.bind angular.bind() }
38-
* {@link angular.extend angular.extend() }
39-
* {@link angular.forEach angular.forEach() }
40-
* {@link angular.identity angular.identity() }
41-
* {@link angular.noop angular.noop() }
42-
43-
44-
## Type Identification
45-
46-
* {@link angular.isArray angular.isArray() }
47-
* {@link angular.isDate angular.isDate() }
48-
* {@link angular.isDefined angular.isDefined() }
49-
* {@link angular.isFunction angular.isFunction() }
50-
* {@link angular.isNumber angular.isNumber() }
51-
* {@link angular.isObject angular.isObject() }
52-
* {@link angular.isString angular.isString() }
53-
* {@link angular.isUndefined angular.isUndefined() }
54-
55-
## Strings
56-
57-
* {@link angular.lowercase angular.lowercase() }
58-
* {@link angular.uppercase angular.uppercase() }
59-
60-
### JSON
61-
62-
* {@link angular.fromJson angular.fromJson() }
63-
* {@link angular.toJson angular.toJson() }
5+
Use the API Refference documentation when you need more information about a specific feature. Check out
6+
{@link guide/ Developer Guide} for AngularJS concepts. If you are new to AngularJS we recomend the
7+
{@link tutorial/ Tutorial}.

docs/content/cookbook/deeplinking.ngdoc

+95-56
Original file line numberDiff line numberDiff line change
@@ -30,72 +30,111 @@ In this example we have a simple app which consist of two screens:
3030
* Welcome: url `welcome` Show the user contact information.
3131
* Settings: url `settings` Show an edit screen for user contact information.
3232

33-
34-
The two partials are defined in the following URLs:
35-
36-
* <a href="examples/settings.html" target="_self">./examples/settings.html</a>
37-
* <a href="examples/welcome.html" target="_self">./examples/welcome.html</a>
38-
39-
<doc:example module="deepLinking">
40-
<doc:source jsfiddle="false">
41-
<script>
42-
angular.module('deepLinking', ['ngSanitize'])
43-
.config(function($routeProvider) {
44-
$routeProvider.when("/welcome", {template:'./examples/welcome.html', controller:WelcomeCntl});
45-
$routeProvider.when("/settings", {template:'./examples/settings.html', controller:SettingsCntl});
46-
});
47-
48-
AppCntl.$inject = ['$scope', '$route']
49-
function AppCntl($scope, $route) {
50-
// initialize the model to something useful
51-
$scope.person = {
52-
name:'anonymous',
53-
contacts:[{type:'email', url:'[email protected]'}]
54-
};
55-
}
56-
57-
function WelcomeCntl($scope) {
58-
$scope.greet = function() {
59-
alert("Hello " + $scope.person.name);
60-
};
61-
}
62-
63-
function SettingsCntl($scope, $location) {
64-
$scope.cancel = function() {
65-
$scope.form = angular.copy($scope.person);
66-
};
67-
68-
$scope.save = function() {
69-
angular.copy($scope.form, $scope.person);
70-
$location.path('/welcome');
71-
};
72-
73-
$scope.cancel();
74-
}
75-
</script>
33+
<example module="deepLinking" deps="angular-sanitize.js">
34+
<file name="script.js">
35+
angular.module('deepLinking', ['ngSanitize'])
36+
.config(function($routeProvider) {
37+
$routeProvider.
38+
when("/welcome", {template:'welcome.html', controller:WelcomeCntl}).
39+
when("/settings", {template:'settings.html', controller:SettingsCntl});
40+
});
41+
42+
AppCntl.$inject = ['$scope', '$route']
43+
function AppCntl($scope, $route) {
44+
$scope.$route = $route;
45+
46+
// initialize the model to something useful
47+
$scope.person = {
48+
name:'anonymous',
49+
contacts:[{type:'email', url:'[email protected]'}]
50+
};
51+
}
52+
53+
function WelcomeCntl($scope) {
54+
$scope.greet = function() {
55+
alert("Hello " + $scope.person.name);
56+
};
57+
}
58+
59+
function SettingsCntl($scope, $location) {
60+
$scope.cancel = function() {
61+
$scope.form = angular.copy($scope.person);
62+
};
63+
64+
$scope.save = function() {
65+
angular.copy($scope.form, $scope.person);
66+
$location.path('/welcome');
67+
};
68+
69+
$scope.cancel();
70+
}
71+
</file>
72+
<file name="style.css">
73+
[ng-view] {
74+
border: 1px solid blue;
75+
margin: 0;
76+
padding:1em;
77+
}
78+
79+
.partial-info {
80+
background-color: blue;
81+
color: white;
82+
padding: 3px;
83+
}
84+
</file>
85+
<file name="index.html">
7686
<div ng-controller="AppCntl">
7787
<h1>Your App Chrome</h1>
7888
[ <a href="welcome">Welcome</a> | <a href="settings">Settings</a> ]
7989
<hr/>
80-
<span style="background-color: blue; color: white; padding: 3px;">
90+
<span class="partial-info">
8191
Partial: {{$route.current.template}}
8292
</span>
83-
<ng:view style="border: 1px solid blue; margin: 0; display:block; padding:1em;"></ng:view>
93+
<div ng-view></div>
8494
<small>Your app footer </small>
8595
</div>
86-
</doc:source>
87-
<doc:scenario>
96+
</file>
97+
<file name="settings.html">
98+
<label>Name:</label>
99+
<input type="text" ng:model="form.name" required>
100+
101+
<div ng:repeat="contact in form.contacts">
102+
<select ng:model="contact.type">
103+
<option>url</option>
104+
<option>email</option>
105+
<option>phone</option>
106+
</select>
107+
<input type="text" ng:model="contact.url">
108+
[ <a href="" ng:click="form.contacts.$remove(contact)">X</a> ]
109+
</div>
110+
<div>
111+
[ <a href="" ng:click="form.contacts.$add()">add</a> ]
112+
</div>
113+
114+
<button ng:click="cancel()">Cancel</button>
115+
<button ng:click="save()">Save</button>
116+
</file>
117+
<file name="welcome.html">
118+
Hello {{person.name}},
119+
<div>
120+
Your contact information:
121+
<div ng:repeat="contact in person.contacts">{{contact.type}}:
122+
<span ng-bind-html="contact.url|linky"></span>
123+
</div>
124+
</div>
125+
</file>
126+
<file name="scenario.js">
88127
it('should navigate to URL', function() {
89-
element('a:contains(Welcome)').click();
90-
expect(element('ng\\:view').text()).toMatch(/Hello anonymous/);
91-
element('a:contains(Settings)').click();
92-
input('form.name').enter('yourname');
93-
element(':button:contains(Save)').click();
94-
element('a:contains(Welcome)').click();
95-
expect(element('ng\\:view').text()).toMatch(/Hello yourname/);
128+
element('a:contains(Welcome)').click();
129+
expect(element('[ng-view]').text()).toMatch(/Hello anonymous/);
130+
element('a:contains(Settings)').click();
131+
input('form.name').enter('yourname');
132+
element(':button:contains(Save)').click();
133+
element('a:contains(Welcome)').click();
134+
expect(element('[ng-view]').text()).toMatch(/Hello yourname/);
96135
});
97-
</doc:scenario>
98-
</doc:example>
136+
</file>
137+
</example>
99138

100139

101140

docs/content/guide/dev_guide.bootstrap.ngdoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Compatibility} doc.
3838

3939
## Creating Your Own Namespaces
4040

41-
When you are ready to define your own {@link api/angular.module.ng.$compileProvider.directive
41+
When you are ready to define your own {@link guide/directive
4242
directive}, you may chose to create your own namespace in addition to specifying the Angular
4343
namespace. You use your own namespace to form the fully qualified name for directives that you
4444
create.

docs/content/guide/dev_guide.compiler.ngdoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@description
44

55
The core of Angular is its HTML compiler. The compiler processes Angular
6-
{@link api/angular.module.ng.$compileProvider.directive directives} allowing them to transform a
6+
{@link guide/directive directives} allowing them to transform a
77
static HTML page into a dynamic web application.
88

99
The default HTML transformations that the Angular compiler provides are useful for building generic
@@ -21,4 +21,4 @@ All compilation takes place in the web browser; no server is involved.
2121
## Related API
2222

2323
* {@link api/angular.module.ng.$compile Angular Compiler API}
24-
* {@link api/angular.module.ng.$compileProvider.directive Directives API}
24+
* {@link guide/directive Directives API}

docs/content/guide/dev_guide.compiler.understanding_compiler.ngdoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@description
44

55
The {@link api/angular.module.ng.$compile compiler} is responsible for applying
6-
{@link api/angular.module.ng.$compileProvider.directive directives} to the HTML. The directives
6+
{@link guide/directive directives} to the HTML. The directives
77
extend the behavior of HTML elements and can effect the DOM structure, presentation, and behavior.
88
This allows Angular to teach the browser new tricks.
99

@@ -21,7 +21,7 @@ Since directives allow attachment of behavior to the HTML, the angular philosoph
2121
HTML as Domain Specific Language (DSL) when building an application. For example it may be useful
2222
to declare `TabPanel` directive, or `KeyboardShortcut` directive when for an application.
2323

24-
For details on how directives are created see {@link api/angular.module.ng.$compileProvider.directive
24+
For details on how directives are created see {@link guide/directive
2525
directives}
2626

2727
## Related Topics

docs/content/guide/dev_guide.forms.ngdoc

+6-6
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ In addition it provides {@link api/angular.module.ng.$compileProvider.directive.
3131
<pre>master = {{master | json}}</pre>
3232
</div>
3333

34-
<script type="text/javascript">
34+
<script>
3535
function Controller($scope) {
3636
$scope.master= {};
3737

@@ -91,7 +91,7 @@ This ensures that the user is not distracted with an error until after interacti
9191
}
9292
</style>
9393

94-
<script type="text/javascript">
94+
<script>
9595
function Controller($scope) {
9696
$scope.master= {};
9797

@@ -152,7 +152,7 @@ This allows us to extend the above example with these features:
152152
</form>
153153
</div>
154154

155-
<script type="text/javascript">
155+
<script>
156156
function Controller($scope) {
157157
$scope.master= {};
158158

@@ -227,7 +227,7 @@ In the following example we create two directives.
227227
</form>
228228
</div>
229229

230-
<script type="text/javascript">
230+
<script>
231231
var app = angular.module('form-example1', []);
232232

233233
var INTEGER_REGEXP = /^\-?\d*$/;
@@ -281,13 +281,13 @@ In order for custom control to work with `ngModel` and to achieve two-way data-b
281281
- implement `render` method, which is responsible for rendering the data after it passed the {@link api/angular.module.ng.$compileProvider.directive.ngModel.NgModelController#$formatters NgModelController#$formatters},
282282
- call `$setViewValue` method, whenever the user interacts with the control and model needs to be updated. This is usually done inside a DOM Event listener.
283283

284-
See {@link api/angular.module.ng.$compileProvider.directive $compileProvider.directive} for more info.
284+
See {@link guide/directive $compileProvider.directive} for more info.
285285

286286
The following example shows how to add two-way data-binding to contentEditable elements.
287287

288288
<doc:example module="form-example2">
289289
<doc:source>
290-
<script type="text/javascript">
290+
<script>
291291
angular.module('form-example2', []).directive('contenteditable', function() {
292292
return {
293293
require: 'ngModel',

0 commit comments

Comments
 (0)