59 lines
1.4 KiB
Plaintext
Raw Normal View History

== Why is this an issue?
2021-04-28 16:49:39 +02:00
Proper use of the ``++angular++`` object is crucial when using the AngularJS framework. Misspell an ``++angular++`` function, and depending on the browser you may not get any errors at all, or the error you do get will be distinctly unhelpful.
This rule is intended to catch misspellings of the recognized ``++angular++`` functions. It checks that only the following functions are used:
* ``++directive++``
* ``++module++``
* ``++controller++``
* ``++provider++``
* ``++filter++``
=== Noncompliant code example
2021-04-28 16:49:39 +02:00
2022-02-04 17:28:24 +01:00
[source,javascript]
2021-04-28 16:49:39 +02:00
----
angular.moudle('docsSimpleDirectiveLD', []); // Noncompliant
----
=== Compliant solution
2021-04-28 16:49:39 +02:00
2022-02-04 17:28:24 +01:00
[source,javascript]
2021-04-28 16:49:39 +02:00
----
angular.module('docsSimpleDirectiveLD', []); // Compliant
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
"xxx" is not a recognized function of the "angular" object.
'''
== Comments And Links
(visible only on this page)
=== on 9 Mar 2015, 10:36:36 Linda Martin wrote:
\[~ann.campbell.2] I don't see the difference between the _Compliant_ and the _Noncompliant_ code snippet.
=== on 9 Mar 2015, 11:48:34 Ann Campbell wrote:
That's kinda the point [~linda.martin]. Look closely. ;-)
=== on 9 Mar 2015, 17:38:27 Ann Campbell wrote:
Oops. Thanks [~linda.martin]
=== on 19 May 2015, 14:27:23 Linda Martin wrote:
Reviewed.
endif::env-github,rspecator-view[]