Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2dda353

Browse files
author
Alex Wolfe
committed
Merge pull request angular#80 from angular/bug-fixes
Bug fixes
2 parents c3c813b + f37d071 commit 2dda353

File tree

82 files changed

+648
-789
lines changed

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

+648
-789
lines changed

public/_includes/_hero.jade

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1+
textFormat = ''
2+
3+
if current.path[4] && current.path[3] == 'api'
4+
textFormat = 'is-standard-case'
5+
6+
17
header(class="hero background-sky")
2-
h1.hero-title.text-display-1 #{title}
8+
h1(class="hero-title text-display-1 #{textFormat}") #{title}
39

410
if subtitle
511
h2.hero-subtitle.text-subhead #{subtitle}

public/docs/dart/latest/resources.jade

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111
.l-main-section
1212
h2 <span class="icon-play-circle-outline"></span> Videos
1313

14-
h4 Intro to building Apps
14+
h4 Intro Vidoes
1515
ul
1616
li <a href="https://www.youtube.com/watch?v=uD6Okha_Yj0">Building a Todo App</a> by David East
17+
li <a href="https://www.youtube.com/watch?v=4C4bmDOV5hk">Angular 2 Forms</a> by David East
1718

1819
h4 ng-conf
1920
ul

public/docs/js/latest/api/annotations/Ancestor-class.jade

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
p.location-badge.
33
exported from <a href="/angular2/annotations.html">angular2/annotations</a>
4-
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/core/annotations/visibility.js#L105">angular2/src/core/annotations/visibility.js (line 105)</a>
4+
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/core/annotations_impl/visibility.js#L105">angular2/src/core/annotations_impl/visibility.js (line 105)</a>
55

66
:markdown
77
Specifies that an injector should retrieve a dependency from any ancestor element.
@@ -14,7 +14,7 @@ p.location-badge.
1414
Here is a simple directive that retrieves a dependency from an ancestor element.
1515

1616
```
17-
@Decorator({
17+
@Directive({
1818
selector: '[dependency]',
1919
properties: {
2020
'id':'dependency'
@@ -25,7 +25,7 @@ p.location-badge.
2525
}
2626

2727

28-
@Decorator({
28+
@Directive({
2929
selector: '[my-directive]'
3030
})
3131
class Dependency {

public/docs/js/latest/api/annotations/Attribute-class.jade

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
p.location-badge.
33
exported from <a href="/angular2/annotations.html">angular2/annotations</a>
4-
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/core/annotations/di.js#L31">angular2/src/core/annotations/di.js (line 31)</a>
4+
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/core/annotations_impl/di.js#L31">angular2/src/core/annotations_impl/di.js (line 31)</a>
55

66
:markdown
77
Specifies that a constant attribute value should be injected.
@@ -19,10 +19,10 @@ p.location-badge.
1919
A decorator can inject string literal `text` like so:
2020

2121
```javascript
22-
@Decorator({
22+
@Directive({
2323
selector: `input'
2424
})
25-
class InputDecorator {
25+
class InputDirective {
2626
constructor(@Attribute('type') type) {
2727
// type would be `text` in this example
2828
}
@@ -50,6 +50,7 @@ p.location-badge.
5050

5151

5252
:markdown
53+
5354

5455

5556

@@ -61,6 +62,7 @@ p.location-badge.
6162

6263

6364
:markdown
65+
6466

6567

6668

public/docs/js/latest/api/annotations/Component-class.jade

Lines changed: 52 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
p.location-badge.
33
exported from <a href="/angular2/annotations.html">angular2/annotations</a>
4-
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/core/annotations/annotations.js#L547">angular2/src/core/annotations/annotations.js (line 547)</a>
4+
defined in <a href="https://github.com/angular/angular/tree/master/modules/angular2/src/core/annotations_impl/annotations.js#L732">angular2/src/core/annotations_impl/annotations.js (line 732)</a>
55

66
:markdown
77
Declare reusable UI building blocks for an application.
@@ -36,6 +36,51 @@ p.location-badge.
3636
}
3737
```
3838

39+
40+
Dynamically loading a component at runtime:
41+
42+
Regular Angular components are statically resolved. Dynamic components allows to resolve a component at runtime
43+
instead by providing a placeholder into which a regular Angular component can be dynamically loaded. Once loaded,
44+
the dynamically-loaded component becomes permanent and cannot be changed.
45+
Dynamic components are declared just like components, but without a `@View` annotation.
46+
47+
48+
## Example
49+
50+
Here we have `DynamicComp` which acts as the placeholder for `HelloCmp`. At runtime, the dynamic component
51+
`DynamicComp` requests loading of the `HelloCmp` component.
52+
53+
There is nothing special about `HelloCmp`, which is a regular Angular component. It can also be used in other static
54+
locations.
55+
56+
```
57+
@Component({
58+
selector: 'dynamic-comp'
59+
})
60+
class DynamicComp {
61+
helloCmp:HelloCmp;
62+
constructor(loader:DynamicComponentLoader, location:ElementRef) {
63+
loader.load(HelloCmp, location).then((helloCmp) => {
64+
this.helloCmp = helloCmp;
65+
});
66+
}
67+
}
68+
69+
@Component({
70+
selector: 'hello-cmp'
71+
})
72+
@View({
73+
template: "{{greeting}}"
74+
})
75+
class HelloCmp {
76+
greeting:string;
77+
constructor() {
78+
this.greeting = "hello";
79+
}
80+
}
81+
```
82+
83+
3984
.l-main-section
4085
h2 Members
4186
.l-sub-section
@@ -52,7 +97,8 @@ p.location-badge.
5297
hostProperties,
5398
injectables,
5499
lifecycle,
55-
changeDetection = DEFAULT
100+
changeDetection = DEFAULT,
101+
compileChildren = true,
56102
}:{
57103
selector:string,
58104
properties:Object,
@@ -61,7 +107,8 @@ p.location-badge.
61107
hostProperties:any,
62108
injectables:List,
63109
lifecycle:List,
64-
changeDetection:string
110+
changeDetection:string,
111+
compileChildren:boolean
65112
}={})
66113

67114
:markdown
@@ -75,6 +122,7 @@ p.location-badge.
75122

76123

77124
:markdown
125+
78126
Defines the used change detection strategy.
79127

80128
When a component is instantiated, Angular creates a change detector, which is responsible for propagating
@@ -92,6 +140,7 @@ p.location-badge.
92140

93141

94142
:markdown
143+
95144
Defines the set of injectable objects that are visible to a Component and its children.
96145

97146
The `injectables` defined in the Component annotation allow you to configure a set of bindings for the component's

public/docs/js/latest/api/annotations/Decorator-class.jade

Lines changed: 0 additions & 105 deletions
This file was deleted.

0 commit comments

Comments
 (0)