Category Archives: AngularJS

AngularJS codes

Arrays

Find Element in Array: {{ array[2] }} OR ng-bind=”array[2]” List Array Elements: ng-repeat=”x in array” / example2 List an Array of Objects:  ng-repeat=”x in array {{ x.key1 + ‘, ‘ + x.key2 }}  ng-repeat=”x in array” {{x}} ng-repeat=”x in array” ng-repeat=”(x, y) in myObj” https://jsfiddle.net/aicccia/smez33q6/ List an … Continue reading

Posted in AngularJS | Tagged , , , , , , , , , , , , , , , ,

Object

Display Object: {{ object.key }} OR ng-bind=”object.key” Display Multiple Keys: https://jsfiddle.net/aicccia/a433oore/ Display Multiple Objects: https://jsfiddle.net/aicccia/0ytp0kvy/ Show/Hide Objects: https://jsfiddle.net/aicccia/a0ajfx9j/ Show Content of Active Menu: https://jsfiddle.net/aicccia/d28vhmkr/ Display Image on Object: https://jsfiddle.net/aicccia/bchbeodn/ Display All Images on Object: https://jsfiddle.net/aicccia/ttn70mug/ Display Non-empty  Image on Object: https://jsfiddle.net/aicccia/wvrhtdto/ Add New Object: ng-submit Show Object Image: ng-src Get $scope objects: console.log(angular.toJson($scope.objectName)); … Continue reading

Posted in AngularJS | Tagged , , , , , , , , , , , , ,

Content

Numbers: {{ 5 + 5 }} {{quantity * cost }} OR ng-bind=”quantity * cost “ Change Content: ng-click=”changeName()” / {{firstname}} / ng-click=”count += 1″ / ng-change Href Link: ng-href Show in Lowercase: angular.lowercase() Show in Uppercase: angular.uppercase() Show Content: ng-show Hide Content: ng-hide Toggle Content: ng-if Disable Content: ng-disabled ng-Pattern:  CSS Style: ng-class Remove … Continue reading

Posted in AngularJS | Tagged , , , , , , , , , ,

Initialize Variable

Initialize Variable: ng-bind=”value” {{ value1 + ” ” + value2 }} OR ng-bind=”value1 + ‘ ‘ + value2″

Posted in AngularJS | Tagged , ,