How to configure AngularJS

AngularJS 2.1 replaces <div> and <div> by JSF tags.
This allows you to add the attributes ng-app and ng-controller
to <div> and <span>. You can also add these tags
to every JSF widget. However, you can't use these tags to other pure HTML tags, such as <section>.

The complete set of attributes to activate AngularJS is shown in this snippet:

Hints

It's a good idea to attach the id "angular" to the <body> tag. In theory, it can also be at different places,
but putting it at the root guarantees it can always be referenced without any prefixes.

ng-app is identical to the ng-app attribute of AngularJS (it's a pass-through attribute).

ng-controller is identical to the ng-controller attribute of AngularJS (it's a pass-through attribute).

angularJSFile is an optional attribute to define the file containing your AngularJS controller.
By default, AngularFaces loads the file main.js in the folder of
the JSF file.

How to configure AngularJS

AngularJS 2.1 replaces <div> and <div> by JSF tags.
This allows you to add the attributes ng-app and ng-controller
to <div> and <span>. You can also add these tags
to every JSF widget. However, you can't use these tags to other pure HTML tags, such as <section>.

The complete set of attributes to activate AngularJS is shown in this snippet:

Hints

It's a good idea to attach the id "angular" to the <body> tag. In theory, it can also be at different places,
but putting it at the root guarantees it can always be referenced without any prefixes.

ng-app is identical to the ng-app attribute of AngularJS (it's a pass-through attribute).

ng-controller is identical to the ng-controller attribute of AngularJS (it's a pass-through attribute).

angularJSFile is an optional attribute to define the file containing your AngularJS controller.
By default, AngularFaces loads the file main.js in the folder of
the JSF file.

How to configure AngularJS

AngularJS 2.1 replaces <div> and <div> by JSF tags.
This allows you to add the attributes ng-app and ng-controller
to <div> and <span>. You can also add these tags
to every JSF widget. However, you can't use these tags to other pure HTML tags, such as <section>.

The complete set of attributes to activate AngularJS is shown in this snippet:

Hints

It's a good idea to attach the id "angular" to the <body> tag. In theory, it can also be at different places,
but putting it at the root guarantees it can always be referenced without any prefixes.

ng-app is identical to the ng-app attribute of AngularJS (it's a pass-through attribute).

ng-controller is identical to the ng-controller attribute of AngularJS (it's a pass-through attribute).

angularJSFile is an optional attribute to define the file containing your AngularJS controller.
By default, AngularFaces loads the file main.js in the folder of
the JSF file.

How to configure AngularJS

AngularJS 2.1 replaces <div> and <div> by JSF tags.
This allows you to add the attributes ng-app and ng-controller
to <div> and <span>. You can also add these tags
to every JSF widget. However, you can't use these tags to other pure HTML tags, such as <section>.

The complete set of attributes to activate AngularJS is shown in this snippet:

Hints

It's a good idea to attach the id "angular" to the <body> tag. In theory, it can also be at different places,
but putting it at the root guarantees it can always be referenced without any prefixes.

ng-app is identical to the ng-app attribute of AngularJS (it's a pass-through attribute).

ng-controller is identical to the ng-controller attribute of AngularJS (it's a pass-through attribute).

angularJSFile is an optional attribute to define the file containing your AngularJS controller.
By default, AngularFaces loads the file main.js in the folder of
the JSF file.