Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
base repository: angular/angular.js
Choose a Base Repository
angular/angular.js
Anuj16/angular.js
ArslanRafique/angular.js
DeborahK/angular.js
EpokK/angular.js
HaoWu/angular.js
IgorMinar/angular.js
JKLFA/angular.js
KAUG/angular.js
Kaic-zz/angular.js
Metric7/angular.js
MikhailTatsky/angular.js
NAzT/angular.js
Narretz/angular.js
Partoo/angular.js
PeterBoesenberg/angular.js
PoshHsu/angular.js
ScxFiction/angular.js
SeanMBe/angular.js
Sharique-Hasan/angular.js
Shipow/angular.js
SjB/angular.js
Sophrinix/angular.js
SumitMunot/angular.js
TEHEK/angular.js
abhisec/angular.js
abnerlinan/angular.js
abrons/angular.js
acosme/angular.js
adam-singer/angular.js
addyosmani/angular.js
agborkowski/angular.js
ajperrins/angular.js
alexeagle/angular.js
alxross/angular.js
aminerahmouni/angular.js
amirhhz/angular.js
angeliaz/angular.js
angularjs-jp/angular.js
anjo/angular.js
arantius/angular.js
ardnet2/angular.js
arsh-co/angular.js
bartes/angular.js
bghanchi/angular.js
blinkbox/angular.js
blueslue/angular.js
boltz/angular.js
bolu/angular.js
briceburg/angular.js
brikou/angular.js
btford/angular.js
byplayer/angular.js
ca136/angular.js
calvinhuang/angular.js
cburgdorf/angular.js
chenermeng/angular.js
chris4403/angular.js
cleyshan/angular.js
codeinpeace/angular.js
colinfrei/angular.js
congmo/angular.js
crossbreeze/angular.js
csii/angular.js
cssgist/angular.js
danielfacanha/angular.js
danilopesouza/angular.js
dankrz/angular.js
dashersw/angular.js
dbinit/angular.js
dcu/angular.js
dhl/angular.js
dineshkummarc/angular.js
dolfly/angular.js
dydycloud/angular.js
eburley/angular.js
elfgoh/angular.js
esprehn/angular.js
fergaldoyle/angular.js
fingerskier/angular.js
flamilton/angular.js
fran6co/angular.js
freewind/angular.js
gaboom/angular.js
gijs/angular.js
girikudlur/angular.js
groner/angular.js
gruber76/angular.js
gwoo/angular.js
hackreactor/angular.js
hardikdangar/angular.js
hjoest/angular.js
hkdobrev/angular.js
hoatle/angular.js
huangciyin/angular.js
huangweili/angular.js
huncent/angular.js
hwclass/angular.js
iammerrick/angular.js
ifedotov/angular.js
imaizumi8925/angular.js
imiborbas/angular.js
intelline/angular.js
jajberni/angular.js
jc1arke/angular.js
jeanielight/angular.js
jecons/angular.js
jimrenwick/angular.js
jjp/angular.js
johnlindquist/angular.js
joshkurz/angular.js
jromero75/angular.js
jsonxu/angular.js
kevan/angular.js
kevinelong/angular.js
kinglerzou/angular.js
kkurni/angular.js
kliu/angular.js
kotiya/angular.js
kyuff/angular.js
lamperwang/angular.js
leeight/angular.js
lobsang/angular.js
lrlopez/angular.js
lt1946/angular.js
ludicast/angular.js
lzlf007/angular.js
m13z/angular.js
maciejblinkbox/angular.js
mailtruck/angular.js
manuel-woelker/angular.js
mdolk/angular.js
mernen/angular.js
mgechev/angular.js
mhevery/angular.js
msgilligan/angular.js
nateabele/angular.js
nateflink/angular.js
neolf/angular.js
patcito/angular.js
pdswan/angular.js
petebacondarwin/angular.js
petrovalex/angular.js
phillipkregg/angular.js
phoo/angular.js
pmurias/angular.js
premblinkbox/angular.js
quangv/angular.js
rafa2000/angular.js
rafaalves/angular.js
rahu28/angular.js
recht/angular.js
redg1974/angular.js
ricardohbin/angular.js
rtnpro/angular.js
ruimonteiro84/angular.js
rulers/angular.js
rwaldron/angular.js
sahilmalik5/angular.js
sangam12345/angular.js
santosomar/angular.js
scuxiayiqian/angular.js
shuvozula/angular.js
shyblower/angular-ie7.js
sjhernes/angular.js
snicolai/angular.js
steinjak/angular.js
stephanebisson/angular.js
stevenp-git/angular.js
sum4me/angular.js
suneil/angular.js
supercool27/angular.js
superman-wrdh/angular.js
thegerr09/angular.js
thenyel/angular.js
thughes/angular.js
timothyx/angular.js
timthesinner/angular.js
tleruitte/angular.js
tobyreynold/angular.js
tonitt/angular.js
trochette/angular.js
unirgy/angular.js
vibster/angular.js
vincentferniot/angular.js
vingo/angular.js
virtualSharif/angular.js
vkoroslev/angular.js
vojtajina/angular.js
witkai/angular.js
woodie/angular.js
wuxq/angular.js
xiehekun/angular.js
xrchen/angular.js
yanneves/angular.js
ysiadf/angular.js
yyx990803/angular.js
zfleet/angular.js
zhangruimin/angular.js
ziakina/angular.js
Nothing to show
base: cf1b175508a7
head repository: angular/angular.js
Choose a Head Repository
angular/angular.js
Anuj16/angular.js
ArslanRafique/angular.js
DeborahK/angular.js
EpokK/angular.js
HaoWu/angular.js
IgorMinar/angular.js
JKLFA/angular.js
KAUG/angular.js
Kaic-zz/angular.js
Metric7/angular.js
MikhailTatsky/angular.js
NAzT/angular.js
Narretz/angular.js
Partoo/angular.js
PeterBoesenberg/angular.js
PoshHsu/angular.js
ScxFiction/angular.js
SeanMBe/angular.js
Sharique-Hasan/angular.js
Shipow/angular.js
SjB/angular.js
Sophrinix/angular.js
SumitMunot/angular.js
TEHEK/angular.js
abhisec/angular.js
abnerlinan/angular.js
abrons/angular.js
acosme/angular.js
adam-singer/angular.js
addyosmani/angular.js
agborkowski/angular.js
ajperrins/angular.js
alexeagle/angular.js
alxross/angular.js
aminerahmouni/angular.js
amirhhz/angular.js
angeliaz/angular.js
angularjs-jp/angular.js
anjo/angular.js
arantius/angular.js
ardnet2/angular.js
arsh-co/angular.js
bartes/angular.js
bghanchi/angular.js
blinkbox/angular.js
blueslue/angular.js
boltz/angular.js
bolu/angular.js
briceburg/angular.js
brikou/angular.js
btford/angular.js
byplayer/angular.js
ca136/angular.js
calvinhuang/angular.js
cburgdorf/angular.js
chenermeng/angular.js
chris4403/angular.js
cleyshan/angular.js
codeinpeace/angular.js
colinfrei/angular.js
congmo/angular.js
crossbreeze/angular.js
csii/angular.js
cssgist/angular.js
danielfacanha/angular.js
danilopesouza/angular.js
dankrz/angular.js
dashersw/angular.js
dbinit/angular.js
dcu/angular.js
dhl/angular.js
dineshkummarc/angular.js
dolfly/angular.js
dydycloud/angular.js
eburley/angular.js
elfgoh/angular.js
esprehn/angular.js
fergaldoyle/angular.js
fingerskier/angular.js
flamilton/angular.js
fran6co/angular.js
freewind/angular.js
gaboom/angular.js
gijs/angular.js
girikudlur/angular.js
groner/angular.js
gruber76/angular.js
gwoo/angular.js
hackreactor/angular.js
hardikdangar/angular.js
hjoest/angular.js
hkdobrev/angular.js
hoatle/angular.js
huangciyin/angular.js
huangweili/angular.js
huncent/angular.js
hwclass/angular.js
iammerrick/angular.js
ifedotov/angular.js
imaizumi8925/angular.js
imiborbas/angular.js
intelline/angular.js
jajberni/angular.js
jc1arke/angular.js
jeanielight/angular.js
jecons/angular.js
jimrenwick/angular.js
jjp/angular.js
johnlindquist/angular.js
joshkurz/angular.js
jromero75/angular.js
jsonxu/angular.js
kevan/angular.js
kevinelong/angular.js
kinglerzou/angular.js
kkurni/angular.js
kliu/angular.js
kotiya/angular.js
kyuff/angular.js
lamperwang/angular.js
leeight/angular.js
lobsang/angular.js
lrlopez/angular.js
lt1946/angular.js
ludicast/angular.js
lzlf007/angular.js
m13z/angular.js
maciejblinkbox/angular.js
mailtruck/angular.js
manuel-woelker/angular.js
mdolk/angular.js
mernen/angular.js
mgechev/angular.js
mhevery/angular.js
msgilligan/angular.js
nateabele/angular.js
nateflink/angular.js
neolf/angular.js
patcito/angular.js
pdswan/angular.js
petebacondarwin/angular.js
petrovalex/angular.js
phillipkregg/angular.js
phoo/angular.js
pmurias/angular.js
premblinkbox/angular.js
quangv/angular.js
rafa2000/angular.js
rafaalves/angular.js
rahu28/angular.js
recht/angular.js
redg1974/angular.js
ricardohbin/angular.js
rtnpro/angular.js
ruimonteiro84/angular.js
rulers/angular.js
rwaldron/angular.js
sahilmalik5/angular.js
sangam12345/angular.js
santosomar/angular.js
scuxiayiqian/angular.js
shuvozula/angular.js
shyblower/angular-ie7.js
sjhernes/angular.js
snicolai/angular.js
steinjak/angular.js
stephanebisson/angular.js
stevenp-git/angular.js
sum4me/angular.js
suneil/angular.js
supercool27/angular.js
superman-wrdh/angular.js
thegerr09/angular.js
thenyel/angular.js
thughes/angular.js
timothyx/angular.js
timthesinner/angular.js
tleruitte/angular.js
tobyreynold/angular.js
tonitt/angular.js
trochette/angular.js
unirgy/angular.js
vibster/angular.js
vincentferniot/angular.js
vingo/angular.js
virtualSharif/angular.js
vkoroslev/angular.js
vojtajina/angular.js
witkai/angular.js
woodie/angular.js
wuxq/angular.js
xiehekun/angular.js
xrchen/angular.js
yanneves/angular.js
ysiadf/angular.js
yyx990803/angular.js
zfleet/angular.js
zhangruimin/angular.js
ziakina/angular.js
Nothing to show
compare: b5dbc9834a18
  • 4 commits
  • 134 files changed
  • 0 commit comments
  • 2 contributors
Commits on May 24, 2016
This is a major re-structuring of the tutorial app's codebase, aiming at applying established best
practices (in terms of file naming/layout and code organization) and utilizing several new features
and enhancements (most notably components) introduced in recent versions of Angular (especially
v1.5).

Apart from the overall changes, two new chapters were introduced: one on components and one on code
organization.

--
In the process, several other things were (incidentally) taken care of, including:

* Dependencies were upgraded to latest versions.
* Animations were polished.
* Outdated links were updated.
* The app's base URL was changed to `/` (instead of `/app/`).

BTW, this has been tested with the following versions of Node (on Windows 10) and everything worked
fine:

* 0.11.16
* 4.2.6
* 4.4.2
* 5.10.0
* 6.2.0

--
This was inspired by (and loosely based on) #13834.
Again, mad props to @teropa for leading the way :)

--
**Note:**
The old version of the tutorial, that is compatible with Angular version 1.4 or older, has been
saved on the `pre-v1.5.0-snapshot` branch of
[angular-phonecat](https://github.com/angular/angular-phonecat). The `v1.4.x` version of the
tutorial should be pointed to that branch instead of `master`.

--
Related to angular/angular-phonecat#326.
Related to angular/angular-seed#341.

Closes #14416
Showing with 116,838 additions and 5,843 deletions.
  1. +5 −0 docs/app/assets/css/docs.css
  2. +4 −3 docs/app/src/tutorials.js
  3. +4 −4 docs/config/templates/indexPage.template.html
  4. +141 −96 docs/content/tutorial/index.ngdoc
  5. +89 −74 docs/content/tutorial/step_00.ngdoc
  6. +9 −5 docs/content/tutorial/step_01.ngdoc
  7. +171 −114 docs/content/tutorial/step_02.ngdoc
  8. +212 −153 docs/content/tutorial/step_03.ngdoc
  9. +241 −125 docs/content/tutorial/step_04.ngdoc
  10. +103 −212 docs/content/tutorial/step_05.ngdoc
  11. +196 −63 docs/content/tutorial/step_06.ngdoc
  12. +214 −282 docs/content/tutorial/step_07.ngdoc
  13. +63 −143 docs/content/tutorial/step_08.ngdoc
  14. +366 −81 docs/content/tutorial/step_09.ngdoc
  15. +145 −111 docs/content/tutorial/step_10.ngdoc
  16. +106 −223 docs/content/tutorial/step_11.ngdoc
  17. +112 −465 docs/content/tutorial/step_12.ngdoc
  18. +321 −0 docs/content/tutorial/step_13.ngdoc
  19. +564 −0 docs/content/tutorial/step_14.ngdoc
  20. +13 −6 docs/content/tutorial/the_end.ngdoc
  21. BIN docs/img/tutorial/tutorial_00_final.png
  22. BIN docs/img/tutorial/tutorial_02.png
  23. BIN docs/img/tutorial/tutorial_03.png
  24. BIN docs/img/tutorial/tutorial_04.png
  25. BIN docs/img/tutorial/tutorial_05.png
  26. BIN docs/img/tutorial/tutorial_05.pptx
  27. BIN docs/img/tutorial/tutorial_06.png
  28. BIN docs/img/tutorial/tutorial_07_final.png
  29. BIN docs/img/tutorial/tutorial_08-09_final.png
  30. BIN docs/img/tutorial/tutorial_09.png
  31. BIN docs/img/tutorial/tutorial_10-11_final.png
  32. BIN docs/img/tutorial/tutorial_10.png
  33. BIN docs/img/tutorial/tutorial_12.png
  34. BIN docs/img/tutorial/xhr_service_final.png
  35. BIN images/docs/Diagrams.graffle/QuickLook/Preview.pdf
  36. BIN images/docs/Diagrams.graffle/QuickLook/Thumbnail.tiff
  37. +1,076 −1,465 images/docs/Diagrams.graffle/data.plist
  38. +3 −0 images/docs/Diagrams.svg/Canvas_8.svg
  39. +3 −0 images/docs/Diagrams.svg/Canvas_angular___parts.svg
  40. +3 −0 images/docs/Diagrams.svg/Canvas_angular___usage.svg
  41. +3 −0 images/docs/Diagrams.svg/Notes.svg
  42. +3 −0 images/docs/Diagrams.svg/One_Way_Data_Binding.svg
  43. +3 −0 images/docs/Diagrams.svg/RESTful_URL.svg
  44. +3 −0 images/docs/Diagrams.svg/RESTy.svg
  45. +3 −0 images/docs/Diagrams.svg/Two_Way_Data_Binding.svg
  46. BIN images/docs/Diagrams.svg/image1.png
  47. BIN images/docs/Diagrams.svg/image2.png
  48. BIN images/docs/Diagrams.svg/image4.png
  49. BIN images/docs/Diagrams.svg/image8.png
  50. BIN images/docs/Diagrams.svg/image9.png
  51. +14,452 −0 images/docs/Diagrams.vdx
  52. +3 −0 images/docs/guide/about_controller.svg
  53. +3,385 −0 images/docs/guide/about_controller.vdx
  54. +3 −0 images/docs/guide/about_model.svg
  55. +2,141 −0 images/docs/guide/about_model.vdx
  56. +879 −961 images/docs/guide/concepts.graffle/data.plist
  57. +3 −0 images/docs/guide/concepts.svg/Canvas_11.svg
  58. +3 −0 images/docs/guide/concepts.svg/controller.svg
  59. +3 −0 images/docs/guide/concepts.svg/databinding1.svg
  60. +3 −0 images/docs/guide/concepts.svg/databinding2.svg
  61. +3 −0 images/docs/guide/concepts.svg/directive.svg
  62. +3 −0 images/docs/guide/concepts.svg/filter.svg
  63. BIN images/docs/guide/concepts.svg/image4.png
  64. BIN images/docs/guide/concepts.svg/image5.png
  65. +3 −0 images/docs/guide/concepts.svg/injector-module.svg
  66. +3 −0 images/docs/guide/concepts.svg/runtime.svg
  67. +3 −0 images/docs/guide/concepts.svg/scope.svg
  68. +3 −0 images/docs/guide/concepts.svg/startup.svg
  69. +3 −0 images/docs/guide/concepts.svg/view.svg
  70. +13,153 −0 images/docs/guide/concepts.vdx
  71. +3 −0 images/docs/guide/di_sequence.svg
  72. +4,288 −0 images/docs/guide/di_sequence.vdx
  73. +3 −0 images/docs/guide/dom_scope.svg
  74. +4,587 −0 images/docs/guide/dom_scope.vdx
  75. +160 −1,257 images/docs/guide/form_data_flow.graffle
  76. +3 −0 images/docs/guide/form_data_flow.svg
  77. +2,075 −0 images/docs/guide/form_data_flow.vdx
  78. +3 −0 images/docs/guide/hashbang_vs_regular_url.svg
  79. +1,660 −0 images/docs/guide/hashbang_vs_regular_url.vdx
  80. BIN images/docs/guide/simple_scope.svg/image7.png
  81. +3 −0 images/docs/guide/simple_scope.svg/simple_scope.svg
  82. +3,839 −0 images/docs/guide/simple_scope.vdx
  83. +3 −0 images/docs/tutorial/di_sequence.svg
  84. +5,295 −0 images/docs/tutorial/di_sequence.vdx
  85. BIN images/docs/tutorial/simple_scope.svg/image7.png
  86. +3 −0 images/docs/tutorial/simple_scope.svg/simple_scope.svg
  87. +3,634 −0 images/docs/tutorial/simple_scope.vdx
  88. +3 −0 images/docs/tutorial/tutorial_00.svg
  89. +1,496 −0 images/docs/tutorial/tutorial_00.vdx
  90. BIN images/docs/tutorial/tutorial_02.svg/image11.png
  91. +1,352 −0 images/docs/tutorial/tutorial_02.svg/tutorial_02.svg
  92. +4,613 −0 images/docs/tutorial/tutorial_02.vdx
  93. BIN images/docs/tutorial/tutorial_03.svg/image11.png
  94. +1,377 −0 images/docs/tutorial/tutorial_03.svg/tutorial_03.svg
  95. +5,108 −0 images/docs/tutorial/tutorial_03.vdx
  96. +5,356 −0 images/docs/tutorial/tutorial_04.vdx
  97. BIN images/docs/tutorial/{tutorial_03.graffle → tutorial_05.graffle}/QuickLook/Preview.pdf
  98. BIN images/docs/tutorial/{tutorial_03.graffle → tutorial_05.graffle}/QuickLook/Thumbnail.tiff
  99. 0 images/docs/tutorial/{tutorial_03.graffle → tutorial_05.graffle}/data.plist
  100. BIN images/docs/tutorial/{tutorial_03.graffle → tutorial_05.graffle}/image13.png
  101. BIN images/docs/tutorial/tutorial_05.svg/image13.png
  102. +1,569 −0 images/docs/tutorial/tutorial_05.svg/tutorial_05.svg
  103. BIN images/docs/tutorial/{tutorial_04.graffle → tutorial_06.graffle}/QuickLook/Preview.pdf
  104. BIN images/docs/tutorial/{tutorial_04.graffle → tutorial_06.graffle}/QuickLook/Thumbnail.tiff
  105. 0 images/docs/tutorial/{tutorial_04.graffle → tutorial_06.graffle}/data.plist
  106. BIN images/docs/tutorial/{tutorial_04.graffle → tutorial_06.graffle}/image15.png
  107. BIN images/docs/tutorial/tutorial_06.svg/image15.png
  108. +1,625 −0 images/docs/tutorial/tutorial_06.svg/tutorial_06.svg
  109. +5,758 −0 images/docs/tutorial/tutorial_07.vdx
  110. +6,220 −0 images/docs/tutorial/tutorial_08-09.vdx
  111. BIN images/docs/tutorial/{tutorial_07.graffle → tutorial_09.graffle}/QuickLook/Preview.pdf
  112. BIN images/docs/tutorial/{tutorial_07.graffle → tutorial_09.graffle}/QuickLook/Thumbnail.tiff
  113. 0 images/docs/tutorial/{tutorial_07.graffle → tutorial_09.graffle}/data.plist
  114. BIN images/docs/tutorial/{tutorial_07.graffle → tutorial_09.graffle}/image9.png
  115. BIN images/docs/tutorial/tutorial_09.svg/image9.png
  116. +1,727 −0 images/docs/tutorial/tutorial_09.svg/tutorial_09.svg
  117. +6,183 −0 images/docs/tutorial/tutorial_10-11.vdx
  118. BIN images/docs/tutorial/{tutorial_08-09.graffle → tutorial_10.graffle}/QuickLook/Preview.pdf
  119. BIN images/docs/tutorial/{tutorial_08-09.graffle → tutorial_10.graffle}/QuickLook/Thumbnail.tiff
  120. 0 images/docs/tutorial/{tutorial_08-09.graffle → tutorial_10.graffle}/data.plist
  121. BIN images/docs/tutorial/{tutorial_08-09.graffle → tutorial_10.graffle}/image10.png
  122. BIN images/docs/tutorial/tutorial_10.svg/image10.png
  123. +1,706 −0 images/docs/tutorial/tutorial_10.svg/tutorial_10.svg
  124. BIN images/docs/tutorial/{tutorial_10-11.graffle → tutorial_12.graffle}/QuickLook/Preview.pdf
  125. BIN images/docs/tutorial/{tutorial_10-11.graffle → tutorial_12.graffle}/QuickLook/Thumbnail.tiff
  126. 0 images/docs/tutorial/{tutorial_10-11.graffle → tutorial_12.graffle}/data.plist
  127. BIN images/docs/tutorial/{tutorial_10-11.graffle → tutorial_12.graffle}/image10.png
  128. BIN images/docs/tutorial/tutorial_12.svg/image10.png
  129. +1,844 −0 images/docs/tutorial/tutorial_12.svg/tutorial_12.svg
  130. BIN images/docs/tutorial/tutorial_proto.svg/image7.png
  131. +3 −0 images/docs/tutorial/tutorial_proto.svg/tutorial_proto.svg
  132. +3,727 −0 images/docs/tutorial/tutorial_proto.vdx
  133. +3 −0 images/docs/tutorial/xhr_service.svg
  134. +3,381 −0 images/docs/tutorial/xhr_service.vdx
@@ -647,6 +647,11 @@ ul.events > li {
padding-top: 50px;
}

.diagram {
margin-bottom: 10px;
margin-top: 30px;
}

@media only screen and (min-width: 769px) and (max-width: 991px) {
.main-body-grid {
margin-top: 160px;
@@ -5,7 +5,8 @@ angular.module('tutorials', [])
'',
'step_00', 'step_01', 'step_02', 'step_03', 'step_04',
'step_05', 'step_06', 'step_07', 'step_08', 'step_09',
'step_10', 'step_11', 'step_12', 'the_end'
'step_10', 'step_11', 'step_12', 'step_13', 'step_14',
'the_end'
];
return {
scope: {},
@@ -43,7 +44,7 @@ angular.module('tutorials', [])
'<a href="http://angular.github.io/angular-phonecat/step-{{step}}/app">Step {{step}} Live Demo</a>.</p>\n' +
'</div>\n' +
'<p>The most important changes are listed below. You can see the full diff on ' +
'<a ng-href="https://github.com/angular/angular-phonecat/compare/step-{{step ? (step - 1): \'0~1\'}}...step-{{step}}" title="See diff on Github">GitHub</a>\n' +
'<a ng-href="https://github.com/angular/angular-phonecat/compare/step-{{step ? (step - 1): \'0~1\'}}...step-{{step}}" title="See diff on Github">GitHub</a>.\n' +
'</p>'
};
});
});
@@ -228,10 +228,10 @@ <h4 class="search-results-group-heading">{{ key }}</h4>
)
</p>
<p>
Code licensed under the
<a href="https://github.com/angular/angular.js/blob/master/LICENSE" target="_blank">The
MIT License</a>. Documentation licensed under <a
href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.
Code licensed under
<a href="https://github.com/angular/angular.js/blob/master/LICENSE" target="_blank">The MIT License</a>.
Documentation licensed under
<a href="http://creativecommons.org/licenses/by/3.0/" target="_blank">CC BY 3.0</a>.
</p>
</div>
</footer>

Large diffs are not rendered by default.

@@ -7,130 +7,143 @@


In this step of the tutorial, you will become familiar with the most important source code files of
the AngularJS phonecat app. You will also learn how to start the development servers bundled with
angular-seed, and run the application in the browser.
the AngularJS Phonecat App. You will also learn how to start the development servers bundled with
[angular-seed][angular-seed], and run the application in the browser.

Before you continue, make sure you have set up your development environment and installed all necessary
dependencies, as described in {@link index#get-started Get Started}.
Before you continue, make sure you have set up your development environment and installed all
necessary dependencies, as described in the {@link tutorial/#environment-setup Environment Setup}
section.

In the `angular-phonecat` directory, run this command:

```
git checkout -f step-0
```


This resets your workspace to step 0 of the tutorial app.

You must repeat this for every future step in the tutorial and change the number to the number of
the step you are on. This will cause any changes you made within your working directory to be lost.

If you haven't already done so you need to install the dependencies by running:
If you haven't already done so, you need to install the dependencies by running:

```
npm install
```

To see the app running in a browser, open a *separate* terminal/command line tab or window, then
run `npm start` to start the web server. Now, open a browser window for the app and navigate to
<a href="http://localhost:8000/app/" target="_blank" title="Open app on localhost">`http://localhost:8000/app/`</a>
To see the app running in a browser, open a _separate_ terminal/command line tab or window, then run
`npm start` to start the web server. Now, open a browser window for the app and navigate to
http://localhost:8000/index.html.

Note that if you already ran the master branch app prior to checking out step-0, you may see the cached
master version of the app in your browser window at this point. Just hit refresh to re-load the page.
Note that if you already ran the master branch app prior to checking out step-0, you may see the
cached master version of the app in your browser window at this point. Just hit refresh to re-load
the page.

You can now see the page in your browser. It's not very exciting, but that's OK.

The HTML page that displays "Nothing here yet!" was constructed with the HTML code shown below.
The code contains some key Angular elements that we will need as we progress.

__`app/index.html`:__
**`app/index.html`:**

```html
<!doctype html>
<html lang="en" ng-app>
<head>
<meta charset="utf-8">
<title>My HTML File</title>
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css">
<link rel="stylesheet" href="css/app.css">
<script src="bower_components/angular/angular.js"></script>
</head>
<body>

<p>Nothing here {{'yet' + '!'}}</p>

</body>
<head>
<meta charset="utf-8">
<title>My HTML File</title>
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css" />
<script src="bower_components/angular/angular.js"></script>
</head>
<body>

<p>Nothing here {{'yet' + '!'}}</p>

</body>
</html>
```



## What is the code doing?

**`ng-app` directive:**
<br />
**`ng-app` attribute:**

<html ng-app>
```html
<html ng-app>
```

The `ng-app` attribute represents an Angular directive, named `ngApp` (Angular uses `kebab-case` for
its custom attributes and `camelCase` for the corresponding directives which implement them). This
directive is used to flag the HTML element that Angular should consider to be the root element of
our application. This gives application developers the freedom to tell Angular if the entire HTML
page or only a portion of it should be treated as the AngularJS application.

The `ng-app` attribute represents an Angular directive named `ngApp` (Angular uses
`spinal-case` for its custom attributes and `camelCase` for the corresponding directives
which implement them).
This directive is used to flag the html element that Angular should consider to be the root element
of our application.
This gives application developers the freedom to tell Angular if the entire html page or only a
portion of it should be treated as the Angular application.
For more info on `ngApp`, check out the {@link ngApp API Reference}.

**AngularJS script tag:**
<br />
**`angular.js` script tag:**

<script src="bower_components/angular/angular.js">
```html
<script src="bower_components/angular/angular.js"></script>
```

This code downloads the `angular.js` script which registers a callback that will be executed by the
This code downloads the `angular.js` script which registers a callback that will be executed by the
browser when the containing HTML page is fully downloaded. When the callback is executed, Angular
looks for the {@link ng.directive:ngApp ngApp} directive. If
Angular finds the directive, it will bootstrap the application with the root of the application DOM
being the element on which the `ngApp` directive was defined.
looks for the {@link ngApp ngApp} directive. If Angular finds the directive, it will bootstrap the
application with the root of the application DOM being the element on which the `ngApp` directive
was defined.

For more info on bootstrapping your app, checkout the [Bootstrap](guide/bootstrap) section of the
Developer Guide.

<br />
**Double-curly binding with an expression:**

Nothing here {{'yet' + '!'}}
```html
Nothing here {{'yet' + '!'}}
```

This line demonstrates two core features of Angular's templating capabilities:

* a binding, denoted by double-curlies `{{ }}`
* a simple expression `'yet' + '!'` used in this binding.
* A binding, denoted by double-curlies: `{{ }}`
* A simple expression used in this binding: `'yet' + '!'`

The binding tells Angular that it should evaluate an expression and insert the result into the
DOM in place of the binding. Rather than a one-time insert, as we'll see in the next steps, a
binding will result in efficient continuous updates whenever the result of the expression
evaluation changes.
The binding tells Angular that it should evaluate an expression and insert the result into the DOM
in place of the binding. As we will see in the next steps, rather than a one-time insert, a binding
will result in efficient continuous updates whenever the result of the expression evaluation
changes.

{@link guide/expression Angular expression} is a JavaScript-like code snippet that is
evaluated by Angular in the context of the current model scope, rather than within the scope of
the global context (`window`).
{@link guide/expression Angular expressions} are JavaScript-like code snippets that are evaluated by
Angular in the context of the current model scope, rather than within the scope of the global
context (`window`).

As expected, once this template is processed by Angular, the html page contains the text:
"Nothing here yet!".
As expected, once this template is processed by Angular, the HTML page contains the text:

## Bootstrapping AngularJS apps
```
Nothing here yet!
```

Bootstrapping AngularJS apps automatically using the `ngApp` directive is very easy and suitable
for most cases. In advanced cases, such as when using script loaders, you can use the
{@link guide/bootstrap imperative / manual way} to bootstrap the app.
## Bootstrapping Angular Applications

There are 3 important things that happen during the app bootstrap:
Bootstrapping Angular applications automatically using the `ngApp` directive is very easy and
suitable for most cases. In advanced cases, such as when using script loaders, you can use the
{@link guide/bootstrap#manual-initialization imperative/manual way} to bootstrap the application.

There are 3 important things that happen during the bootstrap phase:

1. The {@link auto.$injector injector} that will be used for dependency injection is created.

2. The injector will then create the {@link ng.$rootScope root scope} that will
become the context for the model of our application.
2. The injector will then create the {@link ng.$rootScope root scope} that will become the context
for the model of our application.

3. Angular will then "compile" the DOM starting at the `ngApp` root element, processing any
directives and bindings found along the way.


Once an application is bootstrapped, it will then wait for incoming browser events (such as mouse
click, key press or incoming HTTP response) that might change the model. Once such an event occurs,
Angular detects if it caused any model changes and if changes are found, Angular will reflect them
in the view by updating all of the affected bindings.
clicks, key presses or incoming HTTP responses) that might change the model. Once such an event
occurs, Angular detects if it caused any model changes and if changes are found, Angular will
reflect them in the view by updating all of the affected bindings.

The structure of our application is currently very simple. The template contains just one directive
and one static binding, and our model is empty. That will soon change!
@@ -140,27 +153,29 @@ and one static binding, and our model is empty. That will soon change!

## What are all these files in my working directory?


Most of the files in your working directory come from the [angular-seed project][angular-seed] which
is typically used to bootstrap new Angular projects. The seed project is pre-configured to install
the angular framework (via `bower` into the `app/bower_components/` folder) and tools for developing
a typical web app (via `npm`).
Most of the files in your working directory come from the [angular-seed project][angular-seed],
which is typically used to bootstrap new AngularJS projects. The seed project is pre-configured to
install the AngularJS framework (via `bower` into the `app/bower_components/` directory) and tools
for developing and testing a typical web application (via `npm`).

For the purposes of this tutorial, we modified the angular-seed with the following changes:

* Removed the example app
* Added phone images to `app/img/phones/`
* Added phone data files (JSON) to `app/phones/`
* Removed the example app.
* Removed unused dependencies.
* Added phone images to `app/img/phones/`.
* Added phone data files (JSON) to `app/phones/`.
* Added a dependency on [Bootstrap](http://getbootstrap.com) in the `bower.json` file.



# Experiments

* Try adding a new expression to the `index.html` that will do some math:
<div></div>

<p>1 + 2 = {{ 1 + 2 }}</p>
* Try adding a new expression to `index.html` that will do some math:

```html
<p>1 + 2 = {{1 + 2}}</p>
```


# Summary
@@ -12,11 +12,11 @@ dynamically display the same result with any set of data.

In this step you will add some basic information about two cell phones to an HTML page.

- The page now contains a list with information about two phones.
* The page now contains a list with information about two phones.

<div doc-tutorial-reset="1"></div>


<br />
**`app/index.html`:**

```html
@@ -39,15 +39,19 @@ In this step you will add some basic information about two cell phones to an HTM

# Experiments

<div></div>

* Try adding more static HTML to `index.html`. For example:

<p>Total number of phones: 2</p>
```html
<p>Total number of phones: 2</p>
```


# Summary

This addition to your app uses static HTML to display the list. Now, let's go to {@link step_02
step 2} to learn how to use AngularJS to dynamically generate the same list.
This addition to your app uses static HTML to display the list. Now, let's go to
{@link step_02 step 2} to learn how to use Angular to dynamically generate the same list.


<ul doc-tutorial-nav="1"></ul>

No commit comments for this range

You can’t perform that action at this time.