This commit is contained in:
Märt Kalmo 2017-03-04 10:59:28 +02:00
commit 48633a91dc
6 changed files with 171 additions and 0 deletions

12
.gitignore vendored Normal file
View File

@ -0,0 +1,12 @@
node_modules
bower_components
/.settings
/.classpath
/.project
/.idea
*.iml
*.log
/ng2/dist

19
ng1/data/db.json Normal file
View File

@ -0,0 +1,19 @@
{
"contacts": [
{
"_id": 1,
"name": "Jack",
"phone": "123"
},
{
"_id": 2,
"name": "Jill",
"phone": "456"
},
{
"_id": 3,
"name": "Mary",
"phone": "789"
}
]
}

3
ng1/data/routes.json Normal file
View File

@ -0,0 +1,3 @@
{
"/api/": "/"
}

20
ng1/index.html Normal file
View File

@ -0,0 +1,20 @@
<!doctype html>
<html lang="et" ng-app="app">
<head>
<meta charset="utf-8">
<title>Ng1</title>
<link rel="stylesheet" href="styles.css">
<style type="text/css">
.ng-cloak { display: none }
</style>
</head>
<body>
Hello!
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular.min.js"></script>
</body>
</html>

10
ng1/package.json Normal file
View File

@ -0,0 +1,10 @@
{
"name": "ng1",
"version": "1.0.0",
"scripts": {
"start": "json-server ./data/db.json --id _id --static ./ --routes data/routes.json"
},
"devDependencies": {
"json-server": "^0.9.5"
}
}

107
ng1/styles.css Normal file
View File

@ -0,0 +1,107 @@
#simple-modal {
z-index: 3;
display: block;
padding-top: 100px;
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgb(0, 0, 0);
background-color: rgba(0, 0, 0, 0.4)
}
#simple-modal.hide {
display: none;
}
#simple-modal .simple-modal-content {
text-align: center;
margin: auto;
background-color: #fff;
position: relative;
padding: 30px;
outline: 0;
width: 200px;
}
body {
font-size: 12px;
font-family: arial, sans-serif;
color: #333;
width:500px;
}
#message-block {
color: #000;
background-color: #EEffEE;
border: 3px solid #00cc00;
padding: 8px;
margin-bottom: 10px;
}
#message-block li {
list-style: none;
}
#message-block.error-block {
background-color: #ffEEEE;
border: 3px solid #ff0000;
}
#menu {
margin: 0 auto;
padding: 0px 0px 15px 0px;
display: inline;
}
#menu li {
text-align: left;
display: inline;
list-style: none;
padding: 3px 10px 3px 10px;
border: 1px solid #999;
}
#menu li a {
text-decoration: none;
}
.form-table {
background: #fff;
border-collapse: collapse;
border: 1px solid #999;
text-align: left;
}
.form-table td {
padding: 1px 8px;
}
.list-table {
background: #fff;
margin: 0px;
width: 100%;
border-collapse: collapse;
text-align: left;
}
.list-table th {
font-weight: normal;
padding: 0px 8px;
border-bottom: 2px solid #000;
}
.list-table td {
padding: 9px 8px 0px 8px;
}
.list-table tr.selected td {
background-color: #EEE;
}
.right {
text-align: right;
}