Use different names for the attribute on the element (`info`) and the property (`customerInfo`)
on the isolate scope. Before `customer` was used for both which made it harder to understand.
Closes#4825
While giving the controller function a name helps with debugging,
since otherwise your controller will be anonymous in stack traces,
passing the name to both the `controller()` method and as the function name
is confusing for beginners.
Closes#4415
Before:
> Let's add some more logic to the example to
allow to enter and calculate the costs in different currencies and also pay the invoice.
After:
> Let's add some more logic to the example that
allows us to enter and calculate the costs in different currencies and also pay the invoice.
Closes#4903
Hiding `_*` properties was a feature primarily for developers using Closure compiler and Google JS
style. We didn't realize how many people will be affected by this change.
We might introduce this feature in the future, probably under a config option, but it needs more
research and so I'm reverting the change for now.
This reverts commit 3d6a89e888.
Closes#4926Closes#4842Closes#4865Closes#4859Closes#4849
Conflicts:
src/ng/parse.js
Remove reference to `employee` property as it's not used in the example.
Inject and use `$rootScope` applying `department` property as mentioned in text.
Closes#4839
The CSS styling in the ng-scope demo was using CSS classes (`.doc-example-live` and
`.show-scope') to prevent the styling for the demo from affecting the entire page.
Unfortunately elements containing these classes did not appear in JSFiddle or Plunker
when you click edit.
This fix moves the `.show-scope' class inside the demo (renaming it `.show-scope-demo`)
and removes the reliance on `.doc-example-live` altogether.
Closes#4838
params and paramDefaults support looking up the parameter value from the
data object. The syntax for that is `@nested.property.name`.
Currently, $resource uses $parse to do this. This is too liberal
(you can use values like `@a=b` or `@a | filter` and have it work -
which doesn't really make sense). It also puts up a dependency on
$parse which is has restrictions to secure expressions used in
templates. The value here, though a string, is specified in Javascript
code and shouldn't have those restrictions.
This refactors the filter guide docs into a single file.
Also removes out of date references to the fact that Angular used to enhance Arrays while evaluating expressions.
Before, there we multiple overview docs:
- guide/overview
- guide/introduction
- guide/dev_guide.mvc
- guide/dev_guide.mvc.understanding_model
- guide/dev_guide.mvc.understanding_view
- guide/concepts
Now we have:
- guide/introduction: High level description of Angular with the key benefits but without code or any concrete concepts
- guide/concepts: explains all important concepts with a simple example and contains deep links to the other parts of the guide.
All the old information was moved into existing documents or deleted when they were duplicates.
The example about transclusion and scopes worked only because the order of `scope` and `element`
arguments is wrong, which means that the `name' property of the scope is not really being updated.
To really work, the directive has to define its own scope, either a new child scope or, as is more
common with transclusion, an isolated scope.
Closes#4774