我的应用程序中有一些表单.
如何以这样的方式保护表单:如果有人导航或关闭浏览器选项卡,应提示他们确认他们确实要保留未保存数据的表单?
将应用程序升级到 v14.0.2 但当我尝试创建新组件时,它会抛出以下错误。
ng g c views/multi-select
Project "undefined" does not exist.
Run Code Online (Sandbox Code Playgroud)
以下是我的 angular.json 文件
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"ng": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.app.json",
"polyfills": "src/polyfills.ts",
"assets": [
"src/assets",
"src/assets/data.json"
],
"styles": [
"node_modules/@coreui/icons/css/coreui-icons.css",
"node_modules/font-awesome/css/font-awesome.css",
"node_modules/simple-line-icons/css/simple-line-icons.css",
"src/scss/style.scss"
],
"stylePreprocessorOptions": {
"includePaths": [
"./node_modules"
]
},
"scripts": [],
"allowedCommonJsDependencies": [
"lodash",
"sweetalert2",
"file-saver",
"rxjs",
"angular2-datatable",
"moment-timezone"
], …Run Code Online (Sandbox Code Playgroud)