Skip to content

Commit bf79337

Browse files
pkozlowski-opensourcejelbourn
authored andcommitted
chore(rename): rename View and Template concepts for angular#1244
1 parent 564477b commit bf79337

103 files changed

Lines changed: 767 additions & 765 deletions

File tree

Some content is hidden

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

modules/angular2/core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export * from './src/core/annotations/visibility';
22
export * from './src/core/compiler/interfaces';
3-
export * from './src/core/annotations/template';
3+
export * from './src/core/annotations/view';
44
export * from './src/core/application';
55
export * from './src/core/application_tokens';
66
export * from './src/core/annotations/di';

modules/angular2/docs/core/02_directives.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ Here is a trivial example of a tooltip decorator. The directive will log a toolt
6767
```
6868
@Decorator({
6969
selector: '[tooltip]', // CSS Selector which triggers the decorator
70-
bind: { // List which properties need to be bound
70+
properties: { // List which properties need to be bound
7171
text: 'tooltip' // - DOM element tooltip property should be
7272
}, // mapped to the directive text property.
73-
events: { // List which events need to be mapped.
73+
hostListeners: { // List which events need to be mapped.
7474
mouseover: 'show' // - Invoke the show() method every time
7575
} // the mouseover event is fired.
7676
})
@@ -112,13 +112,13 @@ Example of a component:
112112
```
113113
@Component({ | Component annotation
114114
selector: 'pane', | CSS selector on <pane> element
115-
bind: { | List which property need to be bound
115+
properties: { | List which property need to be bound
116116
'title': 'title', | - title mapped to component title
117117
'open': 'open' | - open attribute mapped to component's open property
118118
}, |
119119
}) |
120-
@Template({ | Template annotation
121-
url: 'pane.html' | - URL of template HTML
120+
@View({ | View annotation
121+
templateUrl: 'pane.html' | - URL of template HTML
122122
}) |
123123
class Pane { | Component controller class
124124
title:string; | - title property
@@ -179,7 +179,7 @@ Viewport is a directive which can control instantiation of child views which are
179179
```
180180
@Viewport({
181181
selector: '[if]',
182-
bind: {
182+
properties: {
183183
'condition': 'if'
184184
}
185185
})
@@ -220,7 +220,7 @@ To better understand the kinds of injections which are supported in Angular we h
220220

221221
### Injecting Services
222222

223-
Service injection is the most straight forward kind of injection which Angular supports. It involves a component configuring the `services` and then letting the directive ask for the configured service.
223+
Service injection is the most straight forward kind of injection which Angular supports. It involves a component configuring the `injectables` and then letting the directive ask for the configured service.
224224

225225
This example illustrates how to inject `MyService` into `House` directive.
226226

@@ -231,10 +231,10 @@ class MyService {} | Assume a service which needs to be inject
231231
|
232232
@Component({ | Assume a top level application component which
233233
selector: 'my-app', | configures the services to be injected.
234-
services: [MyService] |
234+
injectables: [MyService] |
235235
}) |
236-
@Template({ | Assume we have a template that needs to be
237-
url: 'my_app.html', | configured with directives to be injected.
236+
@View({ | Assume we have a template that needs to be
237+
templateUrl: 'my_app.html', | configured with directives to be injected.
238238
directives: [House] |
239239
}) |
240240
class MyApp {} |
@@ -279,7 +279,7 @@ Here is an example of the kinds of injections which can be achieved:
279279
@Component({ |
280280
selector: 'my-app', |
281281
template: new TemplateConfig({ |
282-
url: 'my_app.html', |
282+
templateUrl: 'my_app.html', |
283283
directives: [Form, FieldSet, |
284284
Field, Primary] |
285285
}) |

modules/angular2/docs/core/10_view.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ Views form a tree structure which mimics the DOM tree.
1212
nested in a tree like structure. The View tree is a simplified version of the DOM tree. A View can
1313
have a single DOM Element or large DOM structures. The key is that the DOM tree in the View can
1414
not undergo structural changes (only property changes).
15-
* Views represent a running instance of a DOM Template. This implies that while elements in a View
15+
* Views represent a running instance of a DOM View. This implies that while elements in a View
1616
can change properties, they can not change structurally. (Structural changes such as, adding or
1717
removing elements requires adding or removing child Views into ViewContainers).
1818
* View can have zero or more ViewPorts. A ViewPort is a marker in the DOM which allows
1919
the insertion of child Views.
20-
* Views are created from a ProtoView. A ProtoView is a compiled DOM Template which is efficient at
20+
* Views are created from a ProtoView. A ProtoView is a compiled DOM View which is efficient at
2121
creating Views.
2222
* View contains a context object. The context represents the object instance against which all
2323
expressions are evaluated.
@@ -40,7 +40,7 @@ class Greeter {
4040
}
4141
```
4242

43-
And assume following HTML Template:
43+
And assume following HTML View:
4444

4545
```
4646
<div>
@@ -90,7 +90,7 @@ Note:
9090
An important part of an application is to be able to change the DOM structure to render data for the
9191
user. In Angular this is done by inserting child views into the ViewPort.
9292

93-
Let's start with a Template such as:
93+
Let's start with a View such as:
9494

9595
```
9696
<ul>
@@ -194,7 +194,7 @@ class Greeter {
194194
}
195195
```
196196

197-
And assume the following HTML Template:
197+
And assume the following HTML View:
198198

199199
```
200200
<div> | viewA(greeter)

0 commit comments

Comments
 (0)