0% found this document useful (0 votes)
28 views

Angular Js-Assignment1

The document defines an Angular module and controller to manage student data in an array, displaying it in a table with bindings for roll number, name, address, and fees. It also defines variables and functions for a simple addition calculation example using Angular bindings and events. Styles are defined to customize the appearance of elements on the page.

Uploaded by

Geeta Dalvi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Angular Js-Assignment1

The document defines an Angular module and controller to manage student data in an array, displaying it in a table with bindings for roll number, name, address, and fees. It also defines variables and functions for a simple addition calculation example using Angular bindings and events. Styles are defined to customize the appearance of elements on the page.

Uploaded by

Geeta Dalvi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

<scrip src= S!<'"'"c-"!

cL'
<script >
var ob j-angular .IIOdule ( ··myapp" , [ ) ) ;
obj .controller( "myctrl ·· • function (Sscope)
{
Sscope . arraa[{rno:l , stud_ na111e : "raj' ,addres s: ·pune" ,fees:20000},
( rno : 2, stud_ nane : "raju · . addre s s : "munbai · ofees : 390e0}.
{ rno : 3, stud_ nane : • ragni' • address : · pun jab· , fees : 48i!OO} .
{ rno: 4, stud_ nane : · preeti · , address : ' lucknow' • fees : 511000} ,
{ rno : S, stud_ naine : · preet · , address : · nagpur · , fe"s : 2S088} .
(rno: 6, stud_ nane : · pay al ' , address : '1:olhapur · . fees : 26000} ,
{rno : 7 , stud_ nane : · son al' , address : · gujrat · ,fees : 27003} .
{ rno : 8, stud na111e : · kri t I ' , address : · blhar ' , f ees : 28888},
{ rno: 9, stud_ na111e : · kri tika · , address : · j aipur · • fees : 29000} ,
{rno : 18, stud_ name : · praju · ,addres s: 'kolkata · ,fee s: 30800}
]});
</ script >
</head >
<body ng-app• "myapp" ng-control l er- "myctrl" >
able border="2" bgcolcw• "yello"f width= "508" height ="580" align • "center"~
<tr bgcolo r-"purple" style="color: ■ white" >
<th >Roll No</ th >
<th >Naa1e<l th >
<th >Address <l th >
<th >Fee </th >
</ tr >
<tr ns - repeat• "x in arr" alig rt="center" bgcolor• "orange" style m"color: ■ white" >
<td bgcolo r-=" red" >{ { x. r no} } <l td >
<td bgcolo raa "blue '">{ { x . s t ud_name) }</ td >
<td color z" reen" > x.add r ess <l td >
' " - bc,t'de~ • r bgcolor• "yellm,f 11idtl>• "500
~ •bl• eig
<t r bgcola c:a"purple" style~ ·color: ■ wt>ite ·· >
< th >Roll No</ th>
<th >NilR! </ th >
<th >llddress</ th >
c th >F...,</ th >
<l tr>
RoU 1'lo Nam,e
-

ra.1 JOOOO
----
-

ra.Jl u mumbai 30000


- -
-

r:agru punjab 40000


- -

luclmow 50000
--

nagpur 25000
-- -

6 pa~,ral k:o,flu:tpur 26000


'
- ---- -

somtl gujn1t 27000

kri.iri 28000

- -
kritika J.n;pur 29000
- - -
-

-
10, prajU 30000
Jscope . arr2• [ 'A"&Uiar js' , 'Big at a •
});
</script>
<style >
div{ width : isepx; height ; isepx; bacqround - color , ■ gold ; border : 2px solid ; border-c olor ' D b rown ;

roargln : Wpx;

backgr<1und - c:olor : ■ rgb(2SS, e, 34); border - radius : 2px ;


width : 25epx; tie1ght : Uepx;
... rgln : 28px;

</ style>
.1.v ng-c:ollltro . ef"= myctr. >
1 FViBBA( CA) SUBJ '.ECT :
<u:l style="col or: D r e d'' ;. ty,pe= Hdi sc" >
I <li n,g-repeat="'·x in arr1•·' >{{x}}<l li >
</ ul >
•{ / div> <br >< br >
lj n , II' ., .._ . , SI
BA(CA) S L13JECT:

■ DBMS
..- C LAiigu g~
• P01'1
• RDB~[S
<ti e) n
<sc:r-ipt src.,·' angular. min. js~ type "" re
<script >
var obj c ,;1ngular .1110dule( ~myapp"' ~ [] );
obj . controller( "'myctr-1 ·· , fvnc tion ( $scape ){
$s cope . arr=[ {rno :1, snarte .: 'rajl.JI ., • addlf"e55 ; 'f11Jf1Je •" fees :. 2000-0},
. @mo, 2 • sn ,,.., •acpit ' • addce;s: ••umbai • , f ••" 2100o(jj.
{ rno : 3, snane : ·· oxford . , addre55 : , j aipuif"'., -fees : 22000} •
{ rno : 4, sname : •pD"e,e t , • address : . kolkata, .. -fees : 24000}]

}) .
</script >
/ heaal >
body ng- app=ffmy.ipp" ng- con1:r0lLer="111yctr l" >
_ " r="l"
table borde _ .bg,c.olor"=~blaclc.M
_ _ , ="4,..,.,,
widtt1 """' .. ,,,=....
,. .,,dght·'" ' '3"'0~
.., , a.1, 1.gn=
· .. •• c en ter ". >
tr style= color~ □ rgb( 2.55, 0, 43)" llgcolor ,,." aq lJi·.ii'' align=nte11te 1r" >
<th "> Roll No </th >
<th >Stud1mt Na11e</ t l1>
<th >Address </ th >
<'th >Fees </th >
/ tr >
tr ..11"' , = .. x 1n
,.,, -, ., e·at arr·lor-de rB •· '
· r ick'" · '" ·
td bgr,'"'P
o lor="f:ireb >{{ y . - sn. ame al1gn="center·;' >
td b .x.rno}} </ td >
gc:o]or'=" i ndia nred'" >{ { ··1·
td bg,c :olora '"li gh t ,c:ora,1"' ' {x{• • snane . uppercase}} </ td "
td b<>colo~ • i •· ,. . . ,, . x. address} }</ td >
1011 t5ali·n
· ,,_
.... , .,'·{{. x. f, ees} } < I tch
/ tr, ., ,. -
0 ,,.,

/ table >
Roil ~o Stud em f ~~~JIG Fees

RAJU h.me 20000

PREET koJkata 24000

OXFORD - "
Jaipur 22000

ARPIT mumbai 21000


<s.cr.ipt >
var obj =angular. module( wmyapp '" . [ J) _;
obj. controller(''rruyctrl ~"' function ($sc:op,e){
$scope . no!;
$scop,e. no2;
1
$scope. r ,e sul t;
$scope . addit:io,n=-function ()
{
I $scope . l"'eSlill t =$sccpe. nol+Jscope . no2;
}})~.
</ s cript >
/ h.~ad >
body ng-app=~myapp"' ng-controller .. "myctrl" >
<input type,. "chec kbox" ng-mm:1el= '"'x" / >Hide or .show <br ><br >-
q:li v ng-hide= ~i( " >
N!umber1<input type=wnumber" ng - rnodel <= "m::i,1,. / ><hr >
Number2<input type "" ~number~ ng-mdel=- ''rio2 ·~; >< br : :,
( input type== ~l!:iuttonH vaLue="' Addi tio11 ~ rig-click="addition ( )'' I>

Result <inpu t fype="rn.rmber" ng-r.:iodel -= " result"/>


</ div>

/ body >
0 Hide DI" Du1P.f

Nmnber l &
i - - - - - - - - - r
N~~mbem: ~4 l
Add~fiun R~s . . . ._.. 1G

You might also like