我有一个角度4应用程序,我无法设置工作 strActDuration = CStr(Math.Round((dblActual / dblPayAmount), 1))
Dim parts As String() = strActDuration.Split("."c)
Dim strhour As Integer = 0
Dim strminutes As Integer = 0
If parts.Length = 1 Then
strhour = Integer.Parse(parts(0))
strminutes = 0
ElseIf parts.Length = 2 Then
strhour = Integer.Parse(parts(0))
strminutes = Integer.Parse(parts(1))
'strroundminutes = CInt(Math.Round(strminutes, 3))
'strroundminutes = CInt(Math.Truncate(strminutes / 10))
End If
strCombineDuration = strhour & "Hr " & strminutes & "Min"
进行导航。该请求始终会重定向到我的404错误页面。
这是我的代码:
我routerLink
中 route-config 的相关部分:
NgModule
{
path: 'Transactions',
component: TransactionIndexComponent,
children: [
{
path: 'Add',
outlet: "next",
component: TransactionAddComponent,
children: [
{ path: "AddPerson", component: PersonsAddComponent, outlet: "next" }
]
},
]
},
模板的相关部分:
TransactionsIndexComponent
<a routerLink="[{ outlets: { next: 'Add' } } ]" class="tile">Add</a>
<router-outlet name="next"></router-outlet>
模板的相关部分:
TransactionAddComponent
我在<a routerLink="[{ outlets: { next: 'AddPerson' } } ]" class="tile">Add Person</a>
<router-outlet name="next"></router-outlet>
中尝试了routerLink
的这些值:
TransactionsIndexComponent
['', { outlets: { next: 'Add' } } ]
他们都没有奏效。 有什么问题?
PS:嵌套[{ outlets: { next: 'Add' } }]
自带的模板正在运行,因为我可以毫无问题地打开像router-outlet
这样的地址。
答案 0 :(得分:0)
我发现了问题。我错过了multipart_form_data = {
'uploadphotos': (None, 'true', None),
'deletephoto': (None, '0', None),
'upload_input_0': ("test2.jpg", open('test2.jpg', 'rb'),'image/jpeg'),
'upload_path0': (None, 'C:\fakepath\test2.jpg', None),
'e$phMain$UploadButton0': (None, 'Upload photo', None),
'upload_input_1': ('', ''),
'upload_path1': (None, '', None),
'upload_input_2': ('', ''),
'upload_path2': (None, '', None),
'upload_input_3': ('', ''),
'upload_path3': (None, '', None),
'upload_input4': ('', ''),
'upload_path4': (None, '', None),
'upload_input_5': ('', ''),
'upload_path5': (None, '', None),
'upload_input_6': ('', ''),
'upload_path6': (None, '', None),
'upload_input_7': ('', ''),
'upload_path7': (None, '', None),
}
r = s.post(upload_image_url, headers = headers_s, files=multipart_form_data)
中的方括号。这很有效:
[routerLink]