Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

chore($resource): Use shallow copy instead of angular.copy #5252

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
677f10b
chore($resource): Use shallow copy instead of angular.copy
kseamon Dec 3, 2013
4797ba7
Reverts http.js
kseamon Dec 4, 2013
e210f91
Removes a white space, per review.
kseamon Dec 4, 2013
fbc5cf5
docs(tutorial/step-12): fix refernce to incorrect jquery version
elwinarens Nov 26, 2013
280b5ce
chore(closure): add `$routeProvider#redirectTo` function parameters
Nov 27, 2013
1e7675a
docs(input): remove deprecated isolated scope pitfall
revolunet Nov 27, 2013
b38a228
docs(tutorial/step-3): add module to `ng-app` directive in code sample
programistka Nov 28, 2013
e8f4305
docs($interpolate): demonstrate a filter in the interpolated expression
esgy Nov 28, 2013
d802ed1
fix($rootScope): broadcast $destroy event on $rootScope
jeffbcross Dec 4, 2013
93901bd
fix($animate): ensure ms durations are properly rounded
matsko Nov 28, 2013
b6d5439
fix(input): ensure ngModelWatch() triggers second digest pass when ap…
Dec 5, 2013
21e48ab
chore(travis): move checks from before_scripts to scripts
vojtajina Dec 5, 2013
0e50810
fix(ngInit): evaluate ngInit before ngInclude
Nov 30, 2013
958d3d5
fix($animate): ensure animations work with directives that share a tr…
matsko Dec 4, 2013
04a570d
docs(TRIAGING): Initial doc about triaging issues in Angular
tbosch Dec 5, 2013
39c5ffb
docs(tutorial/step-2): remember to install karma plugins
petebacondarwin Dec 5, 2013
2adbcf1
docs(tutorial/step-3): remember to install karma plugins
petebacondarwin Dec 5, 2013
09648e4
docs(tutorial/step-6): remove unused `class="diagram"`
mjomble Nov 29, 2013
1722574
chore($resource): Use shallow copy instead of angular.copy
kseamon Dec 3, 2013
89c146d
Merge branch 'shallow-copy' of https://github.com/kseamon/angular.js …
kseamon Dec 5, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ before_script:
- grunt bower
- grunt bower
- grunt package-without-bower
- grunt ci-checks
- ./lib/sauce/sauce_connect_block.sh

script:
- grunt ci-checks
- ./travis_build.sh

after_script:
Expand Down
55 changes: 55 additions & 0 deletions TRIAGING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Triage new issues/PRs on github

This document shows the steps the Angular team is using to triage issues.
The labels are used later on for planning releases.

## Tips ##

* install [github pr helper extension](https://github.com/petebacondarwin/github-pr-helper) and become 356% more productive
* Label "resolution:*"
* these tags can be used for labeling a closed issue/PR with a reason why it was closed. (we can add reasons as we need them, right there are only a few rejection reasons. it doesn't make sense to label issues that were fixed or prs that were merged)


## Process ##

1. Open list of [non triaged issues](https://github.com/angular/angular.js/issues?direction=desc&milestone=none&page=1&sort=created&state=open)
1. Assign yourself: Pick an issue that is not assigned to anyone and assign it to you
1. Assign milestone:
* "Docs only" milestone - for documentation PR -> **Done**.
* Current/next milestone - regressions
* 1.2.x - everything else
1. Label "GH: *" (to be automated via Mary Poppins)
* PR - issue is a PR
* issue - otherwise
1. Bugs:
* Label "Type: Bug"
* Label "Type: Regression" - if the bug is a regression
* Duplicate? - Check if there are comments pointing out that this is a dupe, if they do exist verify that this is indeed a dupe and close it and go to the last step
* Reproducible? - Steps to reproduce the bug are clear, if not ask for clarification (ideally plunker or fiddle)
* Reproducible on master? - http://code.angularjs.org/snapshot/

1. Non bugs:
* Label "Type: Feature" or "Type: Chore"
* Label "needs: breaking change" - if needed
* Understandable? - verify if the description of the request is clear. if not ask for clarification
* Goals of angular core? - Often new features should be implemented as a third-party module rather than an addition to the core.

1. Label "component: *"
* In rare cases, it's ok to have multiple components.
1. Label "impact: *"
* small - obscure issue affecting one or handful of developers
* medium - impacts some usage patterns
* large - impacts most or all of angular apps
1. Label "complexity: *"
* small - trivial change
* medium - non-trivial but straightforward change
* large - changes to many components in angular or any changes to $compile, ngRepeat or other "fun" components
1. Label "PRs welcome" for "GH: issue"
* if complexity is small or medium and the problem as well as solution are well captured in the issue
1. Label "cla: yes" for "GH: PR":
* otherwise prompt the contributor to sign the CLA
1. Label "origin: google" for issues from Google
1. Label "high priority" for security issues, major performance regressions or memory leaks

1. Unassign yourself from the issue

5 changes: 3 additions & 2 deletions closure/angular.js
Original file line number Diff line number Diff line change
Expand Up @@ -1709,7 +1709,8 @@ angular.$routeProvider.when = function(path, route) {};
* resolve: (Object.<string, (
* string|Function|Array.<string|Function>|angular.$q.Promise
* )>|undefined),
* redirectTo: (string|function()|undefined),
* redirectTo: (
* string|function(Object.<string>, string, Object): string|undefined),
* reloadOnSearch: (boolean|undefined)
* }}
*/
Expand All @@ -1732,7 +1733,7 @@ angular.$routeProvider.Params.templateUrl;
*/
angular.$routeProvider.Params.resolve;

/** @type {string|function()} */
/** @type {string|function(Object.<string>, string, Object): string} */
angular.$routeProvider.Params.redirectTo;

/** @type {boolean} */
Expand Down
6 changes: 5 additions & 1 deletion docs/content/tutorial/step_02.ngdoc
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,11 @@ http://pivotal.github.com/jasmine/ Jasmine home page} and at the {@link
http://pivotal.github.io/jasmine/ Jasmine docs}.

The angular-seed project is pre-configured to run all unit tests using {@link
http://karma-runner.github.io/ Karma}. To run the test, do the following:
http://karma-runner.github.io/ Karma}. Ensure that the necessary karma plugins are installed.
You can do this by issuing `npm install` into your terminal.


To run the test, do the following:

1. In a _separate_ terminal window or tab, go to the `angular-phonecat` directory and run
`./scripts/test.sh` to start the Karma server (the config file necessary to start the server
Expand Down
6 changes: 3 additions & 3 deletions docs/content/tutorial/step_03.ngdoc
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ end-to-end tests! Use `./scripts/e2e-test.sh` script for that. End-to-end tests
with unit tests, Karma will exit after the test run and will not automatically rerun the test
suite on every file change. To rerun the test suite, execute the `e2e-test.sh` script again.

Note: You must ensure you've installed karma-ng-scenario prior to running the `e2e-test.sh` script.
You can do this by issuing `npm install karma-ng-scenario` into your terminal.
Note: You must ensure you've installed the karma-ng-scenario framework plugin prior to running the
`e2e-test.sh` script. You can do this by issuing `npm install` into your terminal.

This test verifies that the search box and the repeater are correctly wired together. Notice how
easy it is to write end-to-end tests in Angular. Although this example is for a simple test, it
Expand All @@ -154,7 +154,7 @@ really is that easy to set up any functional, readable, end-to-end test.
`ngController` declaration to the HTML element because it is the common parent of both the body
and title elements:

<html ng-app ng-controller="PhoneListCtrl">
<html ng-app="phonecatApp" ng-controller="PhoneListCtrl">

Be sure to __remove__ the `ng-controller` declaration from the body element.

Expand Down
2 changes: 1 addition & 1 deletion docs/content/tutorial/step_06.ngdoc
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ We also added phone images next to each record using an image tag with the {@lin
api/ng.directive:ngSrc ngSrc} directive. That directive prevents the
browser from treating the angular `{{ expression }}` markup literally, and initiating a request to
invalid url `http://localhost:8000/app/{{phone.imageUrl}}`, which it would have done if we had only
specified an attribute binding in a regular `src` attribute (`<img class="diagram" src="{{phone.imageUrl}}">`).
specified an attribute binding in a regular `src` attribute (`<img src="{{phone.imageUrl}}">`).
Using the `ngSrc` directive prevents the browser from making an http request to an invalid location.


Expand Down
10 changes: 5 additions & 5 deletions docs/content/tutorial/step_12.ngdoc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ __`app/index.html`.__
<pre>
...
<!-- jQuery is used for JavaScript animations (include this before angular.js) -->
<script src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>

<!-- required module to enable animation support in AngularJS -->
<script src="lib/angular/angular-animate.js"></script>
Expand All @@ -56,6 +56,10 @@ __`app/index.html`.__
...
</pre>

<div class="alert alert-error">
**Important:** Be sure to use jQuery version `1.10.x`. AngularJS does not yet support jQuery `2.x`.
</div>

Animations can now be created within the CSS code (`animations.css`) as well as the JavaScript code (`animations.js`).
But before we start, let's create a new module which uses the ngAnimate module as a dependency just like we did before
with `ngResource`.
Expand Down Expand Up @@ -383,10 +387,6 @@ isn't required to do JavaScript animations with AngularJS, but we're going to us
your own JavaScript animation library is beyond the scope of this tutorial. For more on
`jQuery.animate`, see the {@link http://api.jquery.com/animate/ jQuery documentation}.

<div class="alert alert-error">
**Important:** Be sure to use jQuery version `1.10.x`. AngularJS does not yet support jQuery `2.x`.
</div>

The `addClass` and `removeClass` callback functions are called whenever an a class is added or removed
on the element that contains the class we registered, which is in this case `.phone`. When the `.active`
class is added to the element (via the `ng-class` directive) the `addClass` JavaScript callback will
Expand Down
37 changes: 3 additions & 34 deletions src/ng/directive/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -951,39 +951,6 @@ var VALID_CLASS = 'ng-valid',
</file>
* </example>
*
* ## Isolated Scope Pitfall
*
* Note that if you have a directive with an isolated scope, you cannot require `ngModel`
* since the model value will be looked up on the isolated scope rather than the outer scope.
* When the directive updates the model value, calling `ngModel.$setViewValue()` the property
* on the outer scope will not be updated. However you can get around this by using $parent.
*
* Here is an example of this situation. You'll notice that the first div is not updating the input.
* However the second div can update the input properly.
*
* <example module="badIsolatedDirective">
<file name="script.js">
angular.module('badIsolatedDirective', []).directive('isolate', function() {
return {
require: 'ngModel',
scope: { },
template: '<input ng-model="innerModel">',
link: function(scope, element, attrs, ngModel) {
scope.$watch('innerModel', function(value) {
console.log(value);
ngModel.$setViewValue(value);
});
}
};
});
</file>
<file name="index.html">
<input ng-model="someModel"/>
<div isolate ng-model="someModel"></div>
<div isolate ng-model="$parent.someModel"></div>
</file>
* </example>
*
*
*/
var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$parse',
Expand Down Expand Up @@ -1130,7 +1097,7 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
* It will update the $viewValue, then pass this value through each of the functions in `$parsers`,
* which includes any validators. The value that comes out of this `$parsers` pipeline, be applied to
* `$modelValue` and the **expression** specified in the `ng-model` attribute.
*
*
* Lastly, all the registered change listeners, in the `$viewChangeListeners` list, are called.
*
* Note that calling this function does not trigger a `$digest`.
Expand Down Expand Up @@ -1187,6 +1154,8 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
ctrl.$render();
}
}

return value;
});
}];

Expand Down
3 changes: 3 additions & 0 deletions src/ng/directive/ngInit.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
* to initialize values on a scope.
* </div>
*
* @priority 450
*
* @element ANY
* @param {expression} ngInit {@link guide/expression Expression} to eval.
*
Expand Down Expand Up @@ -47,6 +49,7 @@
</doc:example>
*/
var ngInitDirective = ngDirective({
priority: 450,
compile: function() {
return {
pre: function(scope, element, attrs) {
Expand Down
4 changes: 2 additions & 2 deletions src/ng/interpolate.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ function $InterpolateProvider() {
*
<pre>
var $interpolate = ...; // injected
var exp = $interpolate('Hello {{name}}!');
expect(exp({name:'Angular'}).toEqual('Hello Angular!');
var exp = $interpolate('Hello {{name | uppercase}}!');
expect(exp({name:'Angular'}).toEqual('Hello ANGULAR!');
</pre>
*
*
Expand Down
3 changes: 2 additions & 1 deletion src/ng/rootScope.js
Original file line number Diff line number Diff line change
Expand Up @@ -670,11 +670,12 @@ function $RootScopeProvider(){
*/
$destroy: function() {
// we can't destroy the root scope or a scope that has been already destroyed
if ($rootScope == this || this.$$destroyed) return;
if (this.$$destroyed) return;
var parent = this.$parent;

this.$broadcast('$destroy');
this.$$destroyed = true;
if (this === $rootScope) return;

if (parent.$$childHead == this) parent.$$childHead = this.$$nextSibling;
if (parent.$$childTail == this) parent.$$childTail = this.$$prevSibling;
Expand Down
Loading