Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
ww_question
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
ww_question
Commits
7b9a904b
Commit
7b9a904b
authored
Apr 02, 2020
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
脚手架更新
parent
8e90549e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
MyError.ts
src/app/MyError.ts
+9
-0
app.module.ts
src/app/app.module.ts
+7
-2
No files found.
src/app/MyError.ts
0 → 100644
View file @
7b9a904b
import
{
ErrorHandler
}
from
'
@angular/core
'
;
export
class
MyErrorHandler
implements
ErrorHandler
{
handleError
(
error
)
{
console
.
log
(
error
.
stack
);
(
<
any
>
window
).
courseware
.
sendErrorLog
(
error
);
}
}
\ No newline at end of file
src/app/app.module.ts
View file @
7b9a904b
import
{
BrowserModule
}
from
'
@angular/platform-browser
'
;
import
{
BrowserModule
}
from
'
@angular/platform-browser
'
;
import
{
NgModule
}
from
'
@angular/core
'
;
import
{
NgModule
,
ErrorHandler
}
from
'
@angular/core
'
;
import
{
MyErrorHandler
}
from
'
./MyError
'
;
import
{
AppComponent
}
from
'
./app.component
'
;
import
{
AppComponent
}
from
'
./app.component
'
;
import
{
NgZorroAntdModule
,
NZ_I18N
,
zh_CN
}
from
'
ng-zorro-antd
'
;
import
{
NgZorroAntdModule
,
NZ_I18N
,
zh_CN
}
from
'
ng-zorro-antd
'
;
...
@@ -50,7 +52,10 @@ registerLocaleData(zh);
...
@@ -50,7 +52,10 @@ registerLocaleData(zh);
BrowserAnimationsModule
,
BrowserAnimationsModule
,
FontAwesomeModule
FontAwesomeModule
],
],
providers
:
[{
provide
:
NZ_I18N
,
useValue
:
zh_CN
}],
providers
:
[
{
provide
:
ErrorHandler
,
useClass
:
MyErrorHandler
},
{
provide
:
NZ_I18N
,
useValue
:
zh_CN
}
],
bootstrap
:
[
AppComponent
]
bootstrap
:
[
AppComponent
]
})
})
export
class
AppModule
{
export
class
AppModule
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment