packaged angular-scenario
This tool is now in maintenance mode. If you are starting a new project, please use
Protractor. Existing projects using scenario runner are
advised to migrate to protractor, as this tool is unlikely to receive updates.
This repo is for distribution on npm
and bower
. The source for this module is in the
main AngularJS repo.
Please file issues and pull requests against that repo.
Install
You can install this package either with npm
or with bower
.
npm
npm install angular-scenario
The files are then available at node_modules/angular-scenario/
.
Note that this package is not in CommonJS format, so doing require('angular-scenario')
will
return undefined
.
bower
bower install angular-scenario
The files are then available at bower_components/angular-scenario/
.
Documentation
Documentation is available on the
AngularJS docs site.
License
The MIT License
Copyright (c) 2010-2012 Google, Inc. http://angularjs.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
1.4.0-beta.0 photonic-umbrakinesis (2015-01-13)
Bug Fixes
- $location: support right button click on anchors in firefox
(aa798f12,
#7984)
- $templateRequest: propagate HTTP status on failed requests
(e24f22bd,
#10514, #10628)
- dateFilter: ignore invalid dates
(1334b8c8,
#10640)
- filterFilter: use isArray() to determine array type
(a01ce6b8,
#10621)
- ngChecked: ensure that ngChecked doesn't interfere with ngModel
(e079111b,
#10662, #10664)
- ngClass: handle multi-class definitions as an element of an array
(e1132f53,
#8578, #10651)
- ngModelOptions: allow sharing options between multiple inputs
(9c9c6b3f,
#10667)
- ngOptions:
- ngPluralize: generate a warning when using a not defined rule
(c66b4b6a)
Features
Performance Improvements
Breaking Changes
-
limitTo: due to a3c3bf33,
limitTo changed behavior when limit value is invalid.
Instead of returning empty object/array it returns unchanged input.
-
ngOptions: due to 7fda214c,
When using ngOptions
: the directive applies a surrogate key as the value of the <option>
element.
This commit changes the actual string used as the surrogate key. We now store a string that is computed
by calling hashKey
on the item in the options collection; previously it was the index or key of the
item in the collection.
(This is in keeping with the way that the unknown option value is represented in the select directive.)
Before you might have seen:
<select ng-model="x" ng-option="i in items">
<option value="1">a</option>
<option value="2">b</option>
<option value="3">c</option>
<option value="4">d</option>
</select>
Now it will be something like:
<select ng-model="x" ng-option="i in items">
<option value="string:a">a</option>
<option value="string:b">b</option>
<option value="string:c">c</option>
<option value="string:d">d</option>
</select>
If your application code relied on this value, which it shouldn't, then you will need to modify your
application to accommodate this. You may find that you can use the track by
feature of ngOptions
as this provides the ability to specify the key that is stored.
When iterating over an object's properties using the (key, value) in obj
syntax
the order of the elements used to be sorted alphabetically. This was an artificial
attempt to create a deterministic ordering since browsers don't guarantee the order.
But in practice this is not what people want and so this change iterates over properties
in the order they are returned by Object.keys(obj), which is almost always the order
in which the properties were defined.
setting the ngOptions attribute expression after the element is compiled, will no longer trigger the ngOptions behavior.
This worked previously because the ngOptions logic was part of the select directive, while
it is now implemented in the ngOptions directive itself.
the select
directive will now use strict comparison of the ngModel
scope value against option
values to determine which option is selected. This means Number
scope values will not be matched
against numeric option strings.
In AngularJS 1.3.x, setting scope.x = 200
would select the option
with the value 200 in the following select
:
<select ng-model="x">
<option value="100">100</option>
<option value="200">200</option>
</select>
In AngularJS 1.4.x, the 'unknown option' will be selected.
To remedy this, you can simply initialize the model as a string: scope.x = '200'
, or if you want to
keep the model as a Number
, you can do the conversion via $formatters
and $parsers
on ngModel
:
ngModelCtrl.$parsers.push(function(value) {
return parseInt(value, 10); // Convert option value to number
});
ngModelCtrl.$formatters.push(function(value) {
return value.toString(); // Convert scope value to string
});
<a name="1.3.9"></a>