我为我的“安热”项目增添了素。 但这些风格并不奏效。
我的风格是风格的。 json,但总是一刀切。
我的风格:
@import ../node_modules/primeng/resources/themes/lara-light-blue/theme.css ;
@import ../node_modules/primeicons/primeicons.css ;
@import ../node_modules/primeng/resources/primeng.min.css ;
My complete angular.json: I have to give some more details to the code to save it so I do it here.
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"gw-spc": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/gw-spc",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"node_modules/primeicons/primeicons.css",
"node_modules/primeng/resources/themes/lara-light-blue/theme.css",
"node_modules/primeng/resources/primeng.min.css",
"node_modules/primeflex/primeflex.css",
"src/styles.scss"
],
"scripts": [
"node_modules/chart.js/dist/chart.js"
],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb",
"maximumError": "10kb"
}
]
}
},
"defaultConfiguration": ""
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "gw-spc:build"
},
"configurations": {
"production": {
"browserTarget": "gw-spc:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "gw-spc:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"node_modules/primeicons/primeicons.css",
"node_modules/primeng/resources/themes/lara-light-blue/theme.css",
"node_modules/primeng/resources/primeng.min.css",
"node_modules/primeflex/primeflex.css",
"src/styles.scss"
],
"scripts": []
}
},
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "gw-spc:serve"
},
"configurations": {
"production": {
"devServerTarget": "gw-spc:serve:production"
}
}
}
}
}
}
}
Mylogin.component.html:
<h3 class="p-text-center p-pt-2" >Anmelden</h3>
<hr>
<form [formGroup]="loginForm" (ngSubmit)="anmelden_click()" class="ui-fluid m-3">
<div class="ui-fluid">
<div class="p-field">
<label for="benutzer">Benutzername:</label>
<p-autoComplete formControlName="benutzer" id="benutzer" [suggestions]="filteredUser"
(completeMethod)="search($event)" [emptyMessage]=" Kein Benutzer! "
[required]="true"></p-autoComplete>
</div>
<div class="p-field">
<label for="passwort">Passwort/PIN:</label>
<input formControlName="passwort" id="passwort" type="password" pPassword [feedback]="false">
</div>
<div>
<label class="schrift-kleiner schrift-rot" controlName="fehler"></label>
</div>
<!--div class="p-field">
<label for="werk">Werk:</label>
<p-dropdown formControlName="werk" [options]="werke" [(ngModel)]="selectedWerk" optionLabel="name"></p-dropdown>
</div>
<div>
<label class="schrift-kleiner schrift-rot" controlName="fehlerWerk"></label>
</div-->
</div>
<div class="p-formgroup-inline p-jc-center">
<p-button styleClass="ui-button-success" label="anmelden"></p-button>
</div>
</form>
I站点:
为什么不做我错做的事情,请帮助。