Due to the recent changes ragarding the Docs app "Materialization", some
tests where failing for the following reasons:
1. JQuery wasn't being copied to 'build/docs/components/'.
2. E2E examples 89 and 90 were relying on the Bootstrap's glyphicons.
Temporarily replaced with FontAwesome icons; to be replaced with
Material Design iconfont, when ready.
3. `ngMaterial` (and its various dependencies) weren't loaded by Karma
during unit testing (causing modules depending on it to fail). Added a
fake `ngMaterial` module (as a temporary solution).
Since the structure was a little different than the prototype,
classes/styles where not applied correctly to the links in the left
sidenav. This commit fixes the issue.
I also added FontAwesome, in order to be able to display icons until the
Material Design icon-font is released. Since this is a temporary meassure,
I didn't added as a bower dependency; just added a `font-awesome` folder
in assets and added `font-awesome/css/font-awesome.css` to the stylesheets
of each deployment (under `docs/config/services/deployments/`.
I incorporated the prototype detailed in https://github.com/gkalpak/angular.js/issues/3.
Things that are different from the prototype (besides using actual data):
* The left sidenav (toc) is not styled properly (or even readably).
* The subheaders in the left sidenav are not "stickying" properly (only `ng` becomes sticky).
* Icons are missing (since we are not using FontAwesome). E.g. search-fab, toc-toggle, results
* In the right sidenav (search) there are some unwanted horizontal scrollbars.
(This section probably needs rethinking anyway.)
* I have implemented a `responsiveMenu` directive to show the options in the header-menus
(Learn/Develop/Discuss). The purpose is to show the options in a "dropdown-ish" menu on larger
screens and using a BottomSheet on smaller. At the moment a BottomSheet is used on every
screen-size.
Notes:
- Still no version-picker and breadcrumbs (I have left the original implementation of those two
commented out).
- I have replaced the previous docs.css with a new one containing the style of the prototype.
I have renamed the old one to `docs_old.css` and left it there temporarily for quick reference.
We need to clean up this and the rest of the old CSS files.
- The main content area is totally unstyled and needs some love (a lot actually).
I have also "sprinkled" the code with a few more TODOs/FIXMEs.
(For more details on known issues and missing features take a look at
https://github.com/gkalpak/angular.js/issues/3)
Currently, providing '' to $location#url will only reset the hash, but otherwise has no effect. This
change brings the behaviour of $location#url more inline with window.location.href, which when
assigned to an empty string loads the page's base href.
Before:
$location.url() // http://www.example.com/path
$location.url('') // http://www.example.com/path
After:
$location.url() // http://www.example.com/path
$location.url('') // http://www.example.comFixes#10063Closes#10064
Previously, setting the maxlength to a negative number, would make all
input values invalid (since their length should be less than maxlength,
which is impossible).
This commit changes the behaviour of maxlength/ngMaxlength, effectively
disabling the maxlength validation (always returning true) when maxlength
is set to a negative number. This is more inline to how the HTML5
`maxlength` attribute works (both in browsers and according to the spec:
http://dev.w3.org/html5/spec-preview/attributes-common-to-form-controls.html#attr-fe-maxlength).
Related to #9874Closes#9995
Previously, when (automatically) redirecting from path that fetured a
trailing slash and optional or "eager" parameters, the resulting path
would (incorrectly) contain the special characters (`?`,`*`) along with
the parameter values.
Closes#9819Closes#9827
The ngAnimate makes reference to a function `$animateProvider.classNamePrefix`
that does not exist, the correct function is `$animateProvider.classNameFilter`
Closes#10142
The wordings in setDirty etc. were specific to inputs, but ngModelCtrl
is agnostic to this and the preferred term is 'control'. I also
added some more info about this to the description, and linked to
the example that now lives at the bottom of the page.
- extract existing functionality to public method: $setDirty
- add tests to corresponding changes
- refactor code to use extracted method
Closes#10038Closes#10049
Previously, $validate would execute the parsers to obtain a
modelValue for validation. This was necessary, because a validator
that is called outside of model / view update (e.g. from an observer)
otherwise might only an undefined modelValue, because a previous
view update has found a validation $error and set the model
to undefined (as is tradition in angular)
This is problematic as validators that are run immediately after
the ngModelController initializes would parse the modelValue
and replace the model, even though there had been no user input.
The solution is to go back to an older design: the ngModelController
will now internally record the $$rawModelValue. This means a model
or view update will store the set / parsed modelValue regardless
of validity, that is, it will never set it to undefined because of
validation errors.
When $validate is called, the $$rawModelValue will passed to the
validators. If the validity has changed, the usual behavior is kept:
if it became invalid, set the model to undefined, if valid,
restore the last available modelValue - the $$rawModelValue.
Additionally, $validate will only update the model when the validity
changed. This is to prevent setting initially invalid models other
than undefined to undefined (see #9063)
Fixes: #9063Fixes: #9959Fixes: #9996Fixes: #10025Closes: #9890Closes: #9913Closes: #9997Closes: #10048
The name 'unknown' doesn't appear as a choice, the new choice is just blank.
Side note: once I choose one of the non-blank options, I no longer see the blank option.
Closes#10079
Use the new private function `stringify` to convert scope values to strings,
since this can cope with cyclic references and other oddities.
Closes#10085
Now that `minErr` can cope with objects that cannot be normally stringified
to JSON, just pass the error arguments straight through without trying to
stringify them first.
Closes#9838Closes#10065Closes#10085
Fix the JSON stringification to output a more meaningful string when an
object cannot be normally converted to a JSON string, such as when the
object contains cyclic references that would cause `JSON.stringify()`
to throw an error.
Closes#10085