mirror of
https://github.com/richard-loafle/fuse-angular.git
synced 2025-01-10 12:35:07 +00:00
(Todo App) some fixes about tag routing etc..
This commit is contained in:
parent
46ad46bb02
commit
76f2a7c8df
|
@ -15,7 +15,6 @@ export class MainSidenavComponent implements OnInit, OnDestroy
|
||||||
accounts: object;
|
accounts: object;
|
||||||
selectedAccount: string;
|
selectedAccount: string;
|
||||||
|
|
||||||
// onFoldersChanged: Subscription;
|
|
||||||
onFiltersChanged: Subscription;
|
onFiltersChanged: Subscription;
|
||||||
onTagsChanged: Subscription;
|
onTagsChanged: Subscription;
|
||||||
|
|
||||||
|
@ -47,8 +46,7 @@ export class MainSidenavComponent implements OnInit, OnDestroy
|
||||||
|
|
||||||
ngOnDestroy()
|
ngOnDestroy()
|
||||||
{
|
{
|
||||||
// this.onFoldersChanged.unsubscribe();
|
|
||||||
this.onFiltersChanged.unsubscribe();
|
this.onFiltersChanged.unsubscribe();
|
||||||
// this.onTagsChanged.unsubscribe();
|
this.onTagsChanged.unsubscribe();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -121,8 +121,11 @@ export class TodoDetailsComponent implements OnInit, OnDestroy
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnDestroy()
|
ngOnDestroy()
|
||||||
|
{
|
||||||
|
if ( this.onFormChange )
|
||||||
{
|
{
|
||||||
this.onFormChange.unsubscribe();
|
this.onFormChange.unsubscribe();
|
||||||
|
}
|
||||||
this.onCurrentTodoChanged.unsubscribe();
|
this.onCurrentTodoChanged.unsubscribe();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,12 +43,12 @@ export class TodoListComponent implements OnInit, OnDestroy
|
||||||
this.currentTodo = null;
|
this.currentTodo = null;
|
||||||
|
|
||||||
// Handle the location changes
|
// Handle the location changes
|
||||||
const tagId = this.route.snapshot.params.tagId,
|
const tagHandle = this.route.snapshot.params.tagHandle,
|
||||||
filterHandle = this.route.snapshot.params.filterHandle;
|
filterHandle = this.route.snapshot.params.filterHandle;
|
||||||
|
|
||||||
if ( tagId )
|
if ( tagHandle )
|
||||||
{
|
{
|
||||||
this.location.go('apps/todo/tag/' + tagId);
|
this.location.go('apps/todo/tag/' + tagHandle);
|
||||||
}
|
}
|
||||||
else if ( filterHandle )
|
else if ( filterHandle )
|
||||||
{
|
{
|
||||||
|
@ -74,12 +74,12 @@ export class TodoListComponent implements OnInit, OnDestroy
|
||||||
*/
|
*/
|
||||||
readTodo(todoId)
|
readTodo(todoId)
|
||||||
{
|
{
|
||||||
const tagId = this.route.snapshot.params.tagId,
|
const tagHandle = this.route.snapshot.params.tagHandle,
|
||||||
filterHandle = this.route.snapshot.params.filterHandle;
|
filterHandle = this.route.snapshot.params.filterHandle;
|
||||||
|
|
||||||
if ( tagId )
|
if ( tagHandle )
|
||||||
{
|
{
|
||||||
this.location.go('apps/todo/tag/' + tagId + '/' + todoId);
|
this.location.go('apps/todo/tag/' + tagHandle + '/' + todoId);
|
||||||
}
|
}
|
||||||
else if ( filterHandle )
|
else if ( filterHandle )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user