Commit Graph

555 Commits

Author SHA1 Message Date
Justin Walsh
0eadee5c24 docs(guide/forms): correct grammar 2014-09-11 12:10:24 -07:00
SirTophamHatt
bd8a912774 docs(guide/providers): note that services can create functions
The conclusion table incorrectly states that services can not create functions.
New table row added to separate "can create functions" and "can create primitives".
2014-09-10 16:04:46 -07:00
Tobias Bosch
2a5af502c5 docs($location): clarify guide regarding link handling
The trick with setting `<base href=".">` has not worked since Angular 1.2.0.
It is also misleading that it talks about `$routeProvider.otherwise`
which is not important in this case.

Related to #8869
Closes #8908
2014-09-08 10:40:20 -07:00
Peter Bacon Darwin
b01a03c1b9 docs(guide): add sortOrder to each page
Finally we can control the order of the guide pages
2014-09-04 16:49:25 +01:00
Nima Mehanian
29714a34ab docs(guide/providers): fix grammar and punctuation 2014-09-02 12:43:28 -07:00
Tobias Bosch
22948807e3 fix($location): always resolve relative links in html5mode to <base> url
BREAKING CHANGE (since 1.2.0 and 1.3.0-beta.1):

Angular now requires a `<base>` tag when html5 mode of `$location` is enabled. Reasoning:
Using html5 mode without a `<base href="...">` tag makes relative links for images, links, ...
relative to the current url if the browser supports
the history API. However, if the browser does not support the history API Angular falls back to using the `#`,
and then all those relative links would be broken.

The `<base>` tag is also needed when a deep url is loaded from the server, e.g. `http://server/some/page/url`.
In that case, Angular needs to decide which part of the url is the base of the application, and which part
is path inside of the application.

To summarize: Now all relative links are always relative to the `<base>` tag.

Exception (also a breaking change):
Link tags whose `href` attribute starts with a `#` will only change the hash of the url, but nothing else
(e.g. `<a href="#someAnchor">`). This is to make it easy to scroll to anchors inside a document.

Related to #6162
Closes #8492

BREAKING CHANGE (since 1.2.17 and 1.3.0-beta.10):

In html5 mode without a `<base>` tag on older browser that don't support the history API
relative paths were adding up. E.g. clicking on `<a href="page1">` and then on `<a href="page2">`
would produce `$location.path()==='/page1/page2'. The code that introduced this behavior was removed
and Angular now also requires a `<base>` tag to be present when using html5 mode.

Closes #8172, #8233
2014-08-29 15:19:51 -07:00
Julie
85880a6490 feat(testability): add $$testability service
The $$testability service is a collection of methods for use when debugging
or by automated testing tools. It is available globally through the function
`angular.getTestability`.
For reference, see the Angular.Dart version at
https://github.com/angular/angular.dart/pull/1191
2014-08-28 14:25:50 -07:00
Brian Ford
c6bde52006 docs(debugInfo): add docs for $compileProvider.debugInfoEnabled() 2014-08-27 20:45:59 -07:00
Peter Bacon Darwin
2ab0d5d370 test(e2e): fix by.binding() locators
After upgrading, Protractor requires exact string that is used in the binding.
2014-08-27 20:45:58 -07:00
Akhlesh
b728030be0 docs(guide/directive): update since 'EA' is now the default restrict value
11f5aeeee9 changed the compiler to use 'EA' as a 'restrict'
value if not specified in the directive object, and the directive guide needed some slight
changes to address this.

Closes #8769
2014-08-25 22:53:08 -04:00
vdyckn
2e3a7fd3e9 docs(guide/directive) example79 ptor missing attr
Closes #8257
2014-08-25 12:28:33 -07:00
Smith
a9371a1875 docs(guide/di): correct spelling behinds > behind
Closes #8749
2014-08-23 16:37:07 -04:00
danrbergman
9352bdfdaf docs(guide/module): update tag in description
the reference to 'myApp' module changed in the example from <html> to a <div>. Updating description
to reflect the new <div> tag.

Closes #8720
2014-08-21 23:33:21 -04:00
danrbergman
b8b8411b15 docs(guide/module): make the use of ng-app explicit in example
Helpful for people new to Angular to see the ng-app declaration in context with the expression
example. This will help illustrate the "Important thing to notice" point which follows: "The
reference to myApp module in <html ng-app="myApp">. This is what bootstraps the app using your
module."

Closes #8673
2014-08-21 22:28:15 -04:00
Caitlin Potter
09de7b5db4 feat($compile): use allOrNothing interpolation for ngAttr*
allOrNothing interpolation is now used for ng-attr-*, under all circumstances. This prevents
uninitialized attributes from being added to the DOM with invalid values which cause errors
to be shown.

BREAKING CHANGE:

Now, ng-attr-* will never add the attribute to the DOM if any of the interpolated expressions
evaluate to `undefined`.

To work around this, initialize values which are intended to be the empty string with the
empty string:

For example, given the following markup:

    <div ng-attr-style="border-radius: {{value}}{{units}}"></div>

If $scope.value is `4`, and $scope.units is undefined, the resulting markup is unchanged:

    <div ng-attr-style="border-radius: {{value}}{{units}}"></div>

However, if $scope.units is `""`, then the resulting markup is updated:

    <div ng-attr-style="border-radius: {{value}}{{units}}" style="border-radius: 4"></div>

Closes #8376
Closes #8399
2014-08-21 19:31:50 -04:00
Marty Kane
6fdaa3d5a6 docs(guide/di): correct a few awkward sentences
Closes #8678
2014-08-19 16:50:48 -04:00
Namolovan Nicolae
56bd0378bf docs(guide/e2e-testing): correct link to protractor's getting started
angular/protractor@fcd973b#diff-f3b56000093113bd3bfb6c9c05e7e945 splits the overview doc into
multiple files, and removes overview.md from the repository entirely, making the current link a 404.

This CL points the link to the new getting-started document rather than the overview, and avoids
linking to a missing document.

Closes #8595
2014-08-13 13:20:27 -04:00
Eddie Hedges
e4e7e940f6 docs(guide): correct links to unit testing guides
Closes #8548
2014-08-09 14:00:11 -04:00
Juampy
07d528396e docs(guide/migration): ngSanitize is out ng core at AngularJS 1.2.21
When using ngBindHTML directive, either ngSanitize or $sce must be used
or this will end in a non-trusted value error.

Closes #8519
2014-08-07 21:03:31 -04:00
James Kleeh
7df7d1a9bc docs(guide/directive): explain how to require multiple controllers
Closes #8524
2014-08-07 15:12:49 +01:00
sixin210
fcd76d27e5 docs(guide/concepts): add min to numerical inputs
Closes #8495
2014-08-06 21:03:58 +01:00
cexbrayat
a390612d15 docs(guide/controller): remove duplicate -Controller suffix
Closes #8482
2014-08-06 15:43:46 +01:00
Diego Plentz
1a2ed705d4 docs(guide/concepts): update example
The "A first example: Data binding" section it implies that the `required` directive is
doing something, but it isn't.

I just removed the parts the refer to the required directive to avoid confusion.
2014-07-23 11:30:13 -07:00
Chad Smith
88765d581d docs(guide): remove redundancy in providers guide
Highlighted the Best Practices section, and took the styling from the Services doc.
Also removed some superfluous wording that was in the "Provider Recipe"
2014-07-23 09:19:58 -07:00
hanstest
289b6b4dac docs(guide/directive): fix formatting 2014-07-22 10:33:24 -07:00
Peter Bacon Darwin
38ad144c33 docs(guide/$location): fix up example protractor tests
Closes #8255
2014-07-22 17:54:53 +01:00
vdyckn
df58874747 docs(guide/$location) global cntl deprecated
Closes #8255
2014-07-22 17:54:53 +01:00
Shane Keller
eff00ea98c docs(guide/scope): add missing period 2014-07-21 17:16:45 -07:00
Jason Hamm
92a10d843e docs(guide/bootstrap): fix example 2014-07-21 16:53:07 -07:00
Trey Hunner
a54d4600b3 style: fix whitespace issues
Closes #8277
2014-07-21 14:52:41 -07:00
Nick Van Dyck
b5f0721e3d docs(guide/concepts): use protocol relative URL
When accessing the docs from https, the "Accessing the backend example fails
because it contains a hard coded protocol. By making the URL protocol relative,
the example should work over http and https.
2014-07-21 14:44:11 -07:00
Peter Bacon Darwin
81d9193ed7 docs(guide/module): add protractor tests 2014-07-18 11:05:39 +01:00
Peter Bacon Darwin
9987a609d0 style(guide/module): use dot first style when chaining 2014-07-18 11:05:24 +01:00
Nick Van Dyck
222edd8031 docs(guide/module) fixed global controller in example
Global controllers have been disallowed in Angular 1.3

Closes #8248
2014-07-18 10:51:11 +01:00
Max
4adc44a3d1 docs(guide/forms): fix controller name in example
The "Binding to form and control state" sample had the wrong controller name

Closes #8206
2014-07-16 11:14:24 +01:00
Lucas Galfaso
666a3835d2 refactor(bootstrap): Remove support for old bootstrap mechnanisms
Remove support for bootstrap detection using:

* The element id
* The element class.

E.g.

```
<div id="ng-app">...</div>
<div class="ng-app: module">...</div>
```

Removes reference to how to bootstrap using IE7

BREAKING CHANGE:

If using any of the mechanisms specified above, then migrate by
specifying the attribute `ng-app` to the root element. E.g.

```
<div ng-app="module">...</div>
```

Closes #8147
2014-07-15 17:20:26 -07:00
rodyhaddad
86d55c1ded perf(*): more performant interpolation and lazy one-time binding
BEAKING CHANGE:
Lazy-binding now happens on the scope watcher level.

What this means is that given `parseFn = $parse('::foo')`,
bind-once will only kick in when `parseFn` is being watched by a scope
(i.e. `scope.$watch(parseFn)`)

Bind-once will have no effect when directily invoking `parseFn` (i.e. `parseFn()`)
2014-07-15 13:29:38 -07:00
rodyhaddad
bcf72cacb5 revert: feat(*): lazy one-time binding support
This reverts commit cee429f0aa.

See #7700 for a more performant approach for bind-once.
2014-07-15 13:28:17 -07:00
Peter Bacon Darwin
1453fb72ff docs(guide/unit-testing): add info on testing element transclude directives
Closes #4505
Closes #8197
2014-07-15 12:39:36 +01:00
Pete Bacon Darwin
20b0c2420b docs(guide/migrate): add breaking changes for 1.3
See #8072
2014-07-10 22:44:34 +01:00
Michał Gołębiowski
81cd836137 docs(guide): switch from ngmin to ng-annotate
ng-annotate is an independent alternative to ngmin that is non-invasive
and more performant. For the background around the switch, see the discussion
at:
https://github.com/btford/ngmin/issues/93

Closes #8117
2014-07-10 14:14:30 -07:00
Erin Altenhof-Long
38bdb40675 docs(e2e-testing): fix broken protractor docs link 2014-07-10 09:51:11 -07:00
Brian Ford
5963b5c69f docs(guide/$location): update note about getter/setters 2014-07-08 04:36:26 -07:00
Domenico Matteo
621f678b2d docs(guide/i18n): fix typo 2014-07-08 03:34:27 -07:00
Brian Ford
f9d8819861 docs(guide/expression): update examples to use modules 2014-07-08 02:00:20 -07:00
Brian Ford
7adcbb06c2 docs(guide/scope): update examples to use modules 2014-07-08 02:00:20 -07:00
Brian Ford
470ad11b2a docs(guide/forms): update examples to use modules 2014-07-08 02:00:20 -07:00
Brian Ford
9caff0df97 docs($location): update example to use a module 2014-07-08 02:00:20 -07:00
Peter Bacon Darwin
c0e6527226 docs(guide/controller): tweak initial example 2014-07-03 12:13:12 +01:00
cranesandcaff
be41adc99f docs(guide/controller): only show best practice controller creation
If it is not recommended to use a global function to create controllers,
why should it be shown as possible in the documentation?

One of the most common complaints about AngularJS is that it doesn't enforce
any convention. This is intentional and I generally like this.
However if we can avoid outright bad implementations in examples I believe
we should.

Closes #8011
2014-07-03 12:01:20 +01:00