My friends

Deebhana is friends with Vani Priya

Vani Priya replied to the topic 'How to write login inside a controller?' in the forum. 11 months ago

In Angular logic always goes inside the controller. Below sample shows how we can write logic inside the controller.

var app = angular.module('gmailModule',[]);
app.controller('mailCourseController', function($scope){

$scope.array =

//Json Object declaration
{mailsubject:'Node JS',description:'New JavaScript framework that helps in web development'},
{mailsubject:'PowerShell Scripting',description:'Another must learn scripting launguage '},
{mailsubject:'PowerBI',description:'Best reporting technology'},
{mailsubject:'Remote Desktop Services',description:'RDS virtualization of apps '}

$scope.firstname = 'Satish'
$scope.lastname = 'Kumar'
$scope.fullname = function() {
return $scope.firstName + " " + $scope.lastName;


Vani Priya replied to the topic 'Can someone give 2or 3 examples for filters?' in the forum. 11 months ago

Apart from Uppercase,Lowercase we also have angular filters on Currency and Arrays.
The currency filters formats number to currency.
Apply filters on arrays that results in pattern matching.


<script src=" "></script>

<div ng-app="myCurrency" ng-controller="currencyCtrl">

<h1>Price: {{ price | currency }}</h1>
<h1>Price: {{ price | currency:"&euro;" }}</h1> //Displays in Euros
<h1>Price: {{ price | currency:"&#8377;" }}</h1> //Displays in Rupies


var app = angular.module('myCurrency', []);
app.controller('currencyCtrl', function($scope) {
$scope.price = 100;

Result: $100
To display in other currency you need provide HTML entity for currency symbols.


.Chandra(Admin) is friends with Vani Priya