This repository has been archived by the owner on Aug 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
50 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,29 @@ | ||
script(type='text/javascript', src='lib/jquery/jquery.min.js') | ||
|
||
//AngularJS | ||
script(type='text/javascript', src='lib/angular/angular.min.js') | ||
script(type='text/javascript', src='lib/angular-cookies/angular-cookies.min.js') | ||
script(type='text/javascript', src='lib/angular-resource/angular-resource.min.js') | ||
|
||
//Angular UI | ||
script(type='text/javascript', src='lib/angular-bootstrap/ui-bootstrap-tpls.min.js') | ||
script(type='text/javascript', src='lib/angular-ui-utils/modules/route/route.js') | ||
|
||
//Application Init | ||
script(type='text/javascript', src='js/app.js') | ||
script(type='text/javascript', src='js/config.js') | ||
script(type='text/javascript', src='js/directives.js') | ||
script(type='text/javascript', src='js/filters.js') | ||
|
||
//Application Services | ||
script(type='text/javascript', src='js/services/global.js') | ||
script(type='text/javascript', src='js/services/articles.js') | ||
|
||
//Application Controllers | ||
script(type='text/javascript', src='js/controllers/articles.js') | ||
script(type='text/javascript', src='js/controllers/index.js') | ||
script(type='text/javascript', src='js/controllers/header.js') | ||
script(type='text/javascript', src='js/init.js') | ||
|
||
//livereload script rendered | ||
//Livereload script rendered | ||
script(type='text/javascript', src='http://localhost:35729/livereload.js') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
window.app = angular.module('MEAN', ['ngCookies', 'ngResource', 'ui.bootstrap']); | ||
window.app = angular.module('mean', ['ngCookies', 'ngResource', 'ui.bootstrap', 'ui.route', 'mean.system', 'mean.articles']); | ||
|
||
angular.module('mean.system', []); | ||
angular.module('mean.articles', []); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,11 @@ | ||
function HeaderController($scope, $location, Global) { | ||
angular.module('mean.system').controller('HeaderController', ['$scope', 'Global', function ($scope, Global) { | ||
$scope.global = Global; | ||
|
||
$scope.menu = [{ | ||
"title": "Articles", | ||
"link": "articles" | ||
}, { | ||
"title": "Create New Article", | ||
"link": "articles/create" | ||
}]; | ||
|
||
$scope.init = function() { | ||
|
||
}; | ||
|
||
$scope.isSelected = function(item) { | ||
if ($location.path() == "/"+item.link) { | ||
return "active" | ||
} else return "" | ||
} | ||
} | ||
}]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
function IndexController($scope){ | ||
} | ||
angular.module('mean.system').controller('IndexController', ['$scope', 'Global', function ($scope, Global) { | ||
$scope.global = Global; | ||
}]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,28 @@ | ||
<div class="navbar-inner" data-ng-controller="HeaderController" data-ng-init="init()"> | ||
<ul class="nav"> | ||
<li><a class="brand" href="/">MEAN - A Modern Stack</a></li> | ||
<li data-ng-repeat="item in menu" data-ng-show="global.user" data-ng-class="isSelected(item)"><a href="#!/{{item.link}}">{{item.title}}</a></li> | ||
</ul> | ||
<ul class="nav pull-right" data-ng-hide="global.authenticated"> | ||
<li><a href="signup">Signup</a></li> | ||
<li class="divider-vertical"></li> | ||
<li><a href="signin">Signin</a></li> | ||
</ul> | ||
<ul class="nav pull-right" data-ng-show="global.authenticated"> | ||
<li class="dropdown"> | ||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"> | ||
<div class="navbar-inner" data-ng-controller="HeaderController"> | ||
<ul class="nav"> | ||
<li> | ||
<a class="brand" href="/">MEAN - A Modern Stack</a> | ||
</li> | ||
<li data-ng-repeat="item in menu" data-ng-show="global.user" ui-route="/{{item.link}}" ng-class="{active: $uiRoute}"> | ||
<a href="#!/{{item.link}}">{{item.title}}</a> | ||
</li> | ||
</ul> | ||
<ul class="nav pull-right" data-ng-hide="global.authenticated"> | ||
<li><a href="signup">Signup</a> | ||
</li> | ||
<li class="divider-vertical"></li> | ||
<li><a href="signin">Signin</a> | ||
</li> | ||
</ul> | ||
<ul class="nav pull-right" data-ng-show="global.authenticated"> | ||
<li class="dropdown"> | ||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"> | ||
{{global.user.name}} <b class="caret"></b> | ||
</a> | ||
<ul class="dropdown-menu"> | ||
<li ><a href="/signout">Signout</a></li> | ||
</ul> | ||
</li> | ||
</ul> | ||
<ul class="dropdown-menu"> | ||
<li><a href="/signout">Signout</a> | ||
</li> | ||
</ul> | ||
</li> | ||
</ul> | ||
</div> |