Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature may not be available in some browsers.
<html lang="en" data-ng-app="ngViewExample">
<head>
<link rel="stylesheet" href="css/style.css">
<script src="js/angular.min.js"></script>
<script src="js/angular-route.min.js"></script>
<script src="js/app.js"></script>
<script src="js/controller.js"></script>
</head>
<body>
<nav data-ng-controller="MenuController">
<ul id="nav">
<li data-ng-repeat="entry in menuEntrys" class="{{entry.className}}">
<a href="{{entry.menuLink}}">{{entry.menuName}}</a>
<ul class="dropdown-menu" data-ng-show="entry.sub">
<li ng-repeat="sub in entry.sub">
<a href="{{sub.menuLink}}">{{sub.menuName}}</a>
</li>
</ul>
</li>
</ul>
</nav>
<div data-ng-controller="MainController" data-ng-view="" id="content" style="clear:both">
</div>
</body>
</html>
<article data-ng-repeat="article in contentEntrys">
<header>
<h1>{{article.title}}</h1>
</header>
<p>
{{article.content}}
</p>
</article>
nav ul {
margin:0 40px;
padding: 0;
min-height:34px;
list-style:none;
font-family: "Lucida Sans Unicode", "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
letter-spacing:-0.5px;
font-size:13px;
text-shadow: 0 -1px 3px #202020;
/* Shadoooow */
-moz-border-radius:4px;
-webkit-border-radius:4px;
border-radius:4px;
-moz-box-shadow: 0px 3px 3px #cecece;
-webkit-box-shadow: 0px 3px 3px #cecece;
box-shadow: 0 3px 4px #8b8b8b;
float:left;
}
nav ul li {
display:block;
float:left;
width:105px;
height:34px;
border-right:1px solid #5d5d5d;
border-left:1px solid #929292;
border-bottom:1px solid #575757;
border-top:1px solid #797979;
/* Generated using http://gradients.glrzad.com/ */
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #787878), color-stop(0.5, #5E5E5E), color-stop(0.51, #707070), color-stop(1, #838383));
background-image: -moz-linear-gradient(center bottom, #787878 0%, #5E5E5E 50%, #707070 51%, #838383 100%);
background-color:#5f5f5f; /* Fallback */
}
nav ul li:hover {
/* Generated using http://gradients.glrzad.com/ */
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #3F3F3F), color-stop(0.5, #383838), color-stop(0.51, #434343), color-stop(1, #555555));
background-image: -moz-linear-gradient(center bottom, #3F3F3F 0%, #383838 50%, #434343 51%, #555555 100% );
background-color:#383838; /* Fallback */
/* We use the inset of the box shadow to create a subtle inner glow when hovering */
-moz-box-shadow: inset 0 0 5px 5px #535353;
-webkit-box-shadow: inset 0 0 5px 5px #535353;
box-shadow: inset 0 0 5px 5px #535353;
}
nav ul li:active {
/* Generated using http://gradients.glrzad.com/ */
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #3F3F3F), color-stop(0.5, #383838), color-stop(0.51, #434343), color-stop(1, #555555));
background-image: -moz-linear-gradient(center bottom, #3F3F3F 0%, #383838 50%, #434343 51%, #555555 100% );
background-color:#383838; /* Fallback */
-moz-box-shadow: inset 0 1px 2px 2px #000;
-webkit-box-shadow: inset 0 1px 2px 2px #000;
box-shadow: inset 0 1px 2px 2px #000;
}
nav ul li a {
color:white;
text-decoration:none;
text-align:center;
display:block;
line-height:34px;
outline:none;
}
/* First li element (main menu) */
nav ul li:first-child {
-moz-border-radius:4px 0 0 4px;
-webkit-border-radius:4px 0 0 4px;
border-radius:4px 0 0 4px;
border-left:none;
}
/* Last li element (main menu) */
nav ul li:last-child {
-moz-border-radius:0 4px 4px 0;
-webkit-border-radius:0 4px 4px 0;
border-radius:0 4px 4px 0;
border-right:none;
}
/* Submenu "ul Box" */
nav ul li ul {
margin:0;
visibility: hidden;
}
/* li with sub hovered */
nav ul li:hover ul{
visibility: visible;
}
/* Submenu li element */
nav ul li ul li {
border-top: 1px solid #929292;
border-bottom: 1px solid #5d5d5d;
}
/* First li element */
nav ul li ul li:first-child {
-moz-border-radius:4px 4px 0 0;
-webkit-border-radius:4px 4px 0 0;
border-radius:4px 4px 0 0;
border-top: none;
}
/* Last li element */
nav ul li ul li:last-child {
-moz-border-radius:0 0 4px 4px;
-webkit-border-radius:0 0 4px 4px;
border-radius:0 0 4px 4px;
border-bottom:none;
}
function MenuController($scope) {
$scope.menuEntrys =
[
{menuName : 'Home', menuLink : '#', className : "" },
{menuName : 'Entry1', menuLink : 'index.html#entry1', className : "" },
{menuName : 'Entry2', menuLink : '#', className : "" },
{menuName : 'Sub', menuLink : '#', className : "dropdown", sub :
[
{menuName : 'SubEntry1', menuLink : '#', className : ""},
{menuName : 'SubEntry2', menuLink : '#', className : ""}
]}
];
}
angular.module('ngViewExample', ['ngRoute'], function ($routeProvider, $locationProvider) {
$routeProvider.when('/entry1', {
templateUrl: 'entry1.html',
controller: 'Entry1Controller'
});
});
function MainController($route, $location) {
this.$route = $route;
this.$location = $location;
}
function Entry1Controller($scope) {
$scope.contentEntrys =
[
{title : 'Home', content : 'blalblbjla dlajjldjj asdlkfla fdaljljasdfj'},
{title : 'Supermaaaaan', content : 'bbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbb'},
{title : 'Superlas,cyn', content : 'cccccccc ddddddddd ffffffffff wwwwwwwww qqqqqqqq jjjjjj'}
];
}
function Entry2Controller() {
this.name = 'Entry2';
}
Angular direkt mit Mongo funktioniert meiner Meinung nach nicht. Doch wird in dem Zusammenhang häufig vom MEAN Stack gesprochen (MongoDB, Express, Angular, Node) Wobei der Einarbeitungsaufwand bei "neuen" Technologien leider im Recht hoch ist