AngularJS - Directives
AngularJS directives are used to extend HTML.
ng-app − This directive starts an AngularJS Application.ng-init − This directive initializes application data.
ng-model − This directive defines the model that is variable to be used in AngularJS.
ng-repeat − This directive repeats html elements for each item in a collection.
angular.module("myapp", []) .controller("HelloController", function ($scope) { $scope.countries = [{ "id": 1, "name": "Sweden" }, { "id": 2, "name": "Poland" }, { "id": 3, "name": "Russia" }, { "id": 4, "name": "Argentina" }, { "id": 5, "name": "Venezuela" }, { "id": 6, "name": "Philippines" }, { "id": 7, "name": "China" }, { "id": 8, "name": "Indonesia" }, { "id": 9, "name": "Indonesia" }, { "id": 10, "name": "Portugal" }]; $scope.helloTo = {} $scope.helloTo.title = "AngularJS"; });
AngularJS - Directives
Reviewed by Bhaumik Patel
on
7:06 AM
Rating: