angularjs:angularjs_tutorial
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
angularjs:angularjs_tutorial [2014/06/30 17:26] – [Template filters] mithat | angularjs:angularjs_tutorial [2015/06/25 12:30] (current) – [Specifying routes] mithat | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== An AngularJS Tutorial ====== | ====== An AngularJS Tutorial ====== | ||
- | [[https:// | + | [[https:// |
- Routing | - Routing | ||
Line 31: | Line 31: | ||
<WRAP center round tip 60%> | <WRAP center round tip 60%> | ||
At the time of this writing, I recommend [[https:// | At the time of this writing, I recommend [[https:// | ||
+ | |||
+ | You can also link just the core to the CDN and use local downloads for everything else. | ||
</ | </ | ||
Line 37: | Line 39: | ||
<code javascript> | <code javascript> | ||
- | The second parameter (in this example an empty array) is not optional: it's where additional modules that your app module will use are specified. You'll almost certainly want to put this JS in a separate file. | + | The second parameter (in this example an empty array) is not optional: it's where additional modules |
The resulting not-doing-anything-interesting-yet files might look like: | The resulting not-doing-anything-interesting-yet files might look like: | ||
Line 69: | Line 71: | ||
==== Preparing index.html ==== | ==== Preparing index.html ==== | ||
- | To use AngularJS' | + | To use AngularJS' |
<code html5> | <code html5> | ||
Line 115: | Line 117: | ||
==== Specifying routes ==== | ==== Specifying routes ==== | ||
- | You next need to tell the your app instance that it should use the '' | + | You next need to tell the your app instance that uses the '' |
<file javascript app.js> | <file javascript app.js> | ||
Line 174: | Line 176: | ||
<ul> | <ul> | ||
< | < | ||
- | < | + | < |
</ul> | </ul> | ||
</ | </ | ||
Line 556: | Line 558: | ||
Note that factories know nothing of '' | Note that factories know nothing of '' | ||
- | In the following, we have rewritten the '' | + | In the following, we have rewritten the '' |
<code javascript> | <code javascript> | ||
Line 617: | Line 619: | ||
</ | </ | ||
- | I won't cover and values and providers (for now?). | + | I'm not going to cover and values and providers (for now?). |
+ | |||
+ | The factory and service we created above are very simplistic. In a more typical app, you would put methods for doing [[wp> | ||
- | The factory and service we created above are very simplistic. Typically you would put methods for doing [[wp> | ||
===== Data binding ===== | ===== Data binding ===== | ||
TODO | TODO | ||
===== AJAX and APIs ===== | ===== AJAX and APIs ===== | ||
+ | TODO | ||
+ | |||
+ | ===== Additional modularization ===== | ||
TODO | TODO | ||
angularjs/angularjs_tutorial.1404149210.txt.gz · Last modified: 2014/06/30 17:26 by mithat