From 33e1bdc543bcb7875dcc004d487333393670ed2d Mon Sep 17 00:00:00 2001 From: Peter Bacon Darwin Date: Sun, 16 Feb 2014 22:02:31 +0000 Subject: chore(errors): rename folders to match namespaces --- docs/content/error/compile/ctreq.ngdoc | 49 ---------------------------- docs/content/error/compile/iscp.ngdoc | 25 -------------- docs/content/error/compile/multidir.ngdoc | 17 ---------- docs/content/error/compile/nodomevents.ngdoc | 20 ------------ docs/content/error/compile/nonassign.ngdoc | 41 ----------------------- docs/content/error/compile/selmulti.ngdoc | 20 ------------ docs/content/error/compile/tpload.ngdoc | 11 ------- docs/content/error/compile/tplrt.ngdoc | 39 ---------------------- docs/content/error/compile/uterdir.ngdoc | 34 ------------------- 9 files changed, 256 deletions(-) delete mode 100644 docs/content/error/compile/ctreq.ngdoc delete mode 100644 docs/content/error/compile/iscp.ngdoc delete mode 100644 docs/content/error/compile/multidir.ngdoc delete mode 100644 docs/content/error/compile/nodomevents.ngdoc delete mode 100644 docs/content/error/compile/nonassign.ngdoc delete mode 100644 docs/content/error/compile/selmulti.ngdoc delete mode 100644 docs/content/error/compile/tpload.ngdoc delete mode 100644 docs/content/error/compile/tplrt.ngdoc delete mode 100644 docs/content/error/compile/uterdir.ngdoc (limited to 'docs/content/error/compile') diff --git a/docs/content/error/compile/ctreq.ngdoc b/docs/content/error/compile/ctreq.ngdoc deleted file mode 100644 index 47c876a3..00000000 --- a/docs/content/error/compile/ctreq.ngdoc +++ /dev/null @@ -1,49 +0,0 @@ -@ngdoc error -@name $compile:ctreq -@fullName Missing Required Controller -@description - -This error occurs when {@link ng.$compile HTML compiler} tries to process a directive that specifies the {@link ng.$compile#description_comprehensive-directive-api_directive-definition-object `require` option} in a {@link ng.$compile#description_comprehensive-directive-api directive definition}, -but the required directive controller is not present on the current DOM element (or its ancestor element, if `^` was specified). - -To resolve this error ensure that there is no typo in the required controller name and that the required directive controller is present on the current element. - -If the required controller is expected to be on a ancestor element, make ensure that you prefix the controller name in the `require` definition with `^`. - -If the required controller is optionally requested, use `?` or `^?` to specify that. - - -Example of a directive that requires {@link ng.directive:ngModel ngModel} controller: -``` -myApp.directive('myDirective', function() { - return { - require: 'ngModel', - ... - } -} -``` - -This directive can then be used as: -``` - -``` - - -Example of a directive that optionally requires a {@link ng.directive:form form} controller from an ancestor: -``` -myApp.directive('myDirective', function() { - return { - require: '^?form', - ... - } -} -``` - -This directive can then be used as: -``` -
-
- -
-
-``` diff --git a/docs/content/error/compile/iscp.ngdoc b/docs/content/error/compile/iscp.ngdoc deleted file mode 100644 index 1450dec9..00000000 --- a/docs/content/error/compile/iscp.ngdoc +++ /dev/null @@ -1,25 +0,0 @@ -@ngdoc error -@name $compile:iscp -@fullName Invalid Isolate Scope Definition -@description - -When declaring isolate scope the scope definition object must be in specific format which starts with mode character (`@&=`) with an optional local name. - -``` -myModule.directive('directiveName', function factory() { - return { - ... - scope: { - 'attrName': '@', // OK - 'attrName2': '=localName', // OK - 'attrName3': 'name', // ERROR: missing mode @&= - 'attrName4': ' = name', // ERROR: extra spaces - 'attrName5': 'name=', // ERROR: must be prefixed with @&= - } - ... - } -}); -``` - -Please refer to the {@link ng.$compile#description_comprehensive-directive-api_directive-definition-object -`scope` option} of the directive definition documentation to learn more about the API. diff --git a/docs/content/error/compile/multidir.ngdoc b/docs/content/error/compile/multidir.ngdoc deleted file mode 100644 index 439d82c7..00000000 --- a/docs/content/error/compile/multidir.ngdoc +++ /dev/null @@ -1,17 +0,0 @@ -@ngdoc error -@name $compile:multidir -@fullName Multiple Directive Resource Contention -@description - -This error occurs when multiple directives are applied to the same DOM element, and -processing them would result in a collision or an unsupported configuration. - - -To resolve this issue remove one of the directives which is causing the collision. - -Example scenarios of multiple incompatible directives applied to the same element include: - -* Multiple directives requesting `isolated scope`. -* Multiple directives publishing a controller under the same name. -* Multiple directives declared with the `transclusion` option. -* Multiple directives attempting to define a `template` or `templateURL`. diff --git a/docs/content/error/compile/nodomevents.ngdoc b/docs/content/error/compile/nodomevents.ngdoc deleted file mode 100644 index ed1888c7..00000000 --- a/docs/content/error/compile/nodomevents.ngdoc +++ /dev/null @@ -1,20 +0,0 @@ -@ngdoc error -@name $compile:nodomevents -@fullName Interpolated Event Attributes -@description - -This error occurs when one tries to create a binding for event handler attributes like `onclick`, `onload`, `onsubmit`, etc. - -There is no practical value in binding to these attributes and doing so only exposes your application to security vulnerabilities like XSS. -For these reasons binding to event handler attributes (all attributes that start with `on` and `formaction` attribute) is not supported. - - -An example code that would allow XSS vulnerability by evaluating user input in the window context could look like this: -``` - -
click me
-``` - -Since the `onclick` evaluates the value as JavaScript code in the window context, setting the `username` model to a value like `javascript:alert('PWND')` would result in script injection when the `div` is clicked. - - diff --git a/docs/content/error/compile/nonassign.ngdoc b/docs/content/error/compile/nonassign.ngdoc deleted file mode 100644 index 3a7d996b..00000000 --- a/docs/content/error/compile/nonassign.ngdoc +++ /dev/null @@ -1,41 +0,0 @@ -@ngdoc error -@name $compile:nonassign -@fullName Non-Assignable Expression -@description - -This error occurs when a directive defines an isolate scope property -(using the `=` mode in the {@link ng.$compile#description_comprehensive-directive-api_directive-definition-object -`scope` option} of a directive definition) but the directive is used with an expression that is not-assignable. - -In order for the two-way data-binding to work, it must be possible to write new values back into the path defined with the expression. - -For example, given a directive: - -``` -myModule.directive('myDirective', function factory() { - return { - ... - scope: { - 'bind': '=localValue' - } - ... - } -}); -``` - -Following are invalid uses of this directive: -``` - - - - - -``` - - -To resolve this error, always use path expressions with scope properties that are two-way data-bound: -``` - - -``` - diff --git a/docs/content/error/compile/selmulti.ngdoc b/docs/content/error/compile/selmulti.ngdoc deleted file mode 100644 index 51221ad8..00000000 --- a/docs/content/error/compile/selmulti.ngdoc +++ /dev/null @@ -1,20 +0,0 @@ -@ngdoc error -@name $compile:selmulti -@fullName Binding to Multiple Attribute -@description - -Binding to the `multiple` attribute of `select` element is not supported since switching between multiple and single mode changes the {@link ng.directive:ngModel `ngModel`} object type from instance to array of instances which breaks the model semantics. - -If you need to use different types of `select` elements in your template based on some variable, please use {@link ng.directive:ngIf ngIf} or {@link ng.directive:ngSwitch ngSwitch} directives to select one of them to be used at runtime. - - -Example with invalid usage: -``` - -``` - -Example that uses ngIf to pick one of the `select` elements based on a variable: -``` - - -``` diff --git a/docs/content/error/compile/tpload.ngdoc b/docs/content/error/compile/tpload.ngdoc deleted file mode 100644 index b2b4fb2d..00000000 --- a/docs/content/error/compile/tpload.ngdoc +++ /dev/null @@ -1,11 +0,0 @@ -@ngdoc error -@name $compile:tpload -@fullName Error Loading Template -@description - -This error occurs when {@link ng.$compile `$compile`} attempts to fetch a template from some URL, and the request fails. - -To resolve this error, ensure that the URL of the template is spelled correctly and resolves to correct absolute URL. -The [Chrome Developer Tools](https://developers.google.com/chrome-developer-tools/docs/network#network_panel_overview) might also be helpful in determining why the request failed. - -If you are using {@link ng.$templateCache} to pre-load templates, ensure that the cache was populated with the template. diff --git a/docs/content/error/compile/tplrt.ngdoc b/docs/content/error/compile/tplrt.ngdoc deleted file mode 100644 index 3c29dbdc..00000000 --- a/docs/content/error/compile/tplrt.ngdoc +++ /dev/null @@ -1,39 +0,0 @@ -@ngdoc error -@name $compile:tplrt -@fullName Invalid Template Root -@description - -When a directive is declared with `template` (or `templateUrl`) and `replace` mode on, the template -must have exactly one root element. That is, the text of the template property or the content -referenced by the templateUrl must be contained within a single html element. -For example, `

blah blah blah

` instead of simply `blah blah blah`. -Otherwise, the replacement operation would result in a single element (the directive) being replaced -with multiple elements or nodes, which is unsupported and not commonly needed in practice. - - -For example a directive with definition: - -``` -myModule.directive('myDirective', function factory() { - return { - ... - replace: true, - templateUrl: 'someUrl' - ... - } -}); -``` - -And a template provided at URL `someUrl`. The template must be an html fragment that has only a -single root element, like the `div` element in this template: - -``` -
Hello World!
-``` - -An an invalid template to be used with this directive is one that defines multiple root nodes or -elements. For example: - -``` -Hello World! -``` diff --git a/docs/content/error/compile/uterdir.ngdoc b/docs/content/error/compile/uterdir.ngdoc deleted file mode 100644 index c1f263f9..00000000 --- a/docs/content/error/compile/uterdir.ngdoc +++ /dev/null @@ -1,34 +0,0 @@ -@ngdoc error -@name $compile:uterdir -@fullName Unterminated Directive -@description - -This error occurs when using multi-element directives and a `directive-start` attribute fails to form a matching pair with a corresponding `directive-end` attribute. -A `directive-start` should have a matching `directive-end` on a sibling node in the DOM. For instance, - -``` - - I get repeated - I also get repeated -
-``` - -is a valid example. - -This error can occur in several different ways. One is by leaving out the `directive-end` attribute, like so: - -``` -
- -
-``` - -Another is by nesting a `directive-end` inside of `directive-start`, or vice versa: - -``` -
- -
-``` - -To avoid this error, make sure each `directive-start` you use has a matching `directive-end` on a sibling node in the DOM. -- cgit v1.2.3