-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappfact.js
21 lines (17 loc) · 846 Bytes
/
appfact.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
var myApp=angular.module("myApp");
myApp.factory( 'myService', function (){
var factory ={};
factory.intialValue = function()
{
var books =[];
var book={title:"DanBrown ", price:"250" , author:"Dan Brown", soldout:false,img_url : "images/inferno.jpg",notAvailable:false };
books.push(book);
book={title:"Screats of Naga ", price:"300" , author:"amith mishra", soldout:true, img_url :"images/Naga.jpg",notAvailable:false };
books.push(book);
book={title:"Krishana Key ", price:"300" , author:"Ashwin", soldout:false, img_url :"images/Krishnakey.jpg", notAvailable:false};
books.push(book);
return books;
// var books="krishna";
}
return factory;
});