Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed routing #18

Merged
merged 1 commit into from
Dec 3, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 25 additions & 25 deletions javascripts/AppConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,30 +35,30 @@ app.config(function($routeProvider){
templateUrl: 'partials/auth.html',
controller:'AuthCtrl'
})
// .when('/boards/list', {
// templateUrl: 'partials/general-view.html',
// controller: 'GeneralViewCtrl',
// resolve: {isAuth}
// })
// .when('/boards/new', {
// templateUrl: 'partials/create-board.html',
// controller: 'CreateBoardCtrl',
// resolve: {isAuth}
// })
// .when('/boards/view/:id', {
// templateUrl: 'partials/board-view.html',
// controller: 'BoardViewCtrl',
// resolve: {isAuth}
// })
// .when('/boards/edit/:id', {
// templateUrl: 'partials/create-board.html',
// controller:'BoardEditCtrl',
// resolve: {isAuth}
// })
// .when('/logout', {
// templateUrl: 'partials/auth.html',
// controller: 'AuthCtrl',
// resolve: {isAuth}
// })
.when('/boards/list', {
templateUrl: 'partials/general-view.html',
controller: 'GeneralViewCtrl',
resolve: {isAuth}
})
.when('/boards/new', {
templateUrl: 'partials/board-new.html',
controller: 'CreateBoardCtrl',
resolve: {isAuth}
})
.when('/boards/view/:id', {
templateUrl: 'partials/board-view.html',
controller: 'BoardViewCtrl',
resolve: {isAuth}
})
.when('/boards/edit/:id', {
templateUrl: 'partials/board-new.html',
controller:'BoardEditCtrl',
resolve: {isAuth}
})
.when('/logout', {
templateUrl: 'partials/auth.html',
controller: 'AuthCtrl',
resolve: {isAuth}
})
.otherwise('/auth');
});
2 changes: 1 addition & 1 deletion javascripts/controllers/GeneralViewCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ app.controller("GeneralViewCtrl", function($scope, $rootScope, BoardFactory){
$scope.boards = [];

let getBoards = function(){
BoardFactory.getGeneralView($rootScope.user.uid).then(function(fbItems){
BoardFactory.getBoardList($rootScope.user.uid).then(function(fbItems){
$scope.boards = fbItems;
});
};
Expand Down
2 changes: 1 addition & 1 deletion partials/board-new.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<h3>New Todo</h3>
<form>
<div class="form-group">
<label>Pin</label>
<label>Pins</label>
<input type="text" class="form-control" placeholder="New Pin" ng-model="newPin.pin">
</div>

Expand Down
4 changes: 4 additions & 0 deletions partials/board-view.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<h1>Board: {{selectedBoard.pin}}</h1>
<button type="btn btn-info"><a ng-href="#/boards/edit/{{selectedBoard.id}}">Edit</a></button>
<h2>Helana's Boards: {{selectedBoard.assignedTo}}</h2>
<h2>My Pins: {{selectedBoard.isSelected}}</h2>
17 changes: 17 additions & 0 deletions partials/login
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<div class="container">
<form class="form-signin">
<h2 class="form-signin-heading" id="banner">
<img src="http://res.cloudinary.com/emma/image/upload/v1480545088/PinThis_fgaae2.png"</h2>
<label for="inputEmail" class="sr-only">Email address</label>
<input type="email" id="inputEmail" class="form-control" placeholder="Email address" required autofocus>
<label for="inputPassword" class="sr-only">Password</label>
<input type="password" id="inputPassword" class="form-control" placeholder="Password" required>
<div class="checkbox">
<label>
<input type="checkbox" value="remember-me"> Remember me
</label>
</div>
<button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
</form>

</div>