Guard выдает ошибку при попытке перенаправить на другую страницу

Используя встроенную функцию списка, вы можете сделать это

a
out:[[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]
#Displaying the list

a.remove(a[0])
out:[[1, 1, 1, 1], [1, 1, 1, 1]]
# Removed the first element of the list in which you want altered number

a.append([5,1,1,1])
out:[[1, 1, 1, 1], [1, 1, 1, 1], [5, 1, 1, 1]]
# append the element in the list but the appended element as you can see is appended in last but you want that in starting

a.reverse()
out:[[5, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]
#So at last reverse the whole list to get the desired list
0
задан Aeseir 24 March 2019 в 04:08
поделиться

2 ответа

Синтаксис для вторичной розетки отличается, вам нужно определить объект - это первый параметр, чтобы связать параметр массива

0
ответ дан Chellappan 24 March 2019 в 04:08
поделиться

Вы добавили неавторизованный путь для публичной розетки, так что это происходит. Вы можете удалить опцию розетки из app.routing.module.ts

  { path: 'unauthorized', component: UnauthorizedComponent, outlet: 'public'},

TO:

  { path: 'unauthorized', component: UnauthorizedComponent },

И html

<router-outlet *ngIf="isAuthenticated()"></router-outlet>
<router-outlet *ngIf="!isAuthenticated()" name="public"></router-outlet>

К

<router-outlet></router-outlet>
0
ответ дан Omkar Yadav 24 March 2019 в 04:08
поделиться
Другие вопросы по тегам:

Похожие вопросы: