primeflex icon indicating copy to clipboard operation
primeflex copied to clipboard

Not working in Angular

Open HenriquePereiraRosa opened this issue 8 years ago • 3 comments

I couldn't make the PimeFlex work in my project.

  • Command to install: npm install primeflex --save

After that the folder was installed perfectly in "node_modules" and save in "package.json":

"primeflex": "^1.0.0-rc.1",

  • I'm trying to use in my .html but is not working:

`

Dashboard - AR CONDICIONADO

<div class="p-grid">
  <div class="p-col-12 p-md-4">
    <div class="box">
      <p-card>
        <h4>Corrente: {{sensor?.current}}A</h4>
      </p-card>
    </div>
  </div>

  <div class="p-col-12 p-md-4">
    <div class="box">
      <p-card>
        Temperatura: {{sensor?.temperature}}ºC
      </p-card>

      <p-card>
        Umidade: {{sensor?.humidity}}%
      </p-card>

      <p-card>
        Bateria: {{sensor?.vBat}}V
      </p-card>
    </div>
  </div>

  <div class="p-col-12 p-md-4">
    <div class="box">
      <p-card>
        <div>Status: </div>
        <br>
        <div *ngIf="getAnomaly(); then true_content else false_content"></div>
        <ng-template #true_content><img width='20%' src="../../../assets/img/status_icons/error_red.png"></ng-template>
        <ng-template #false_content><img width='20%' src="../../../assets/img/status_icons/ok_green.jpg"></ng-template>
      </p-card>
    </div>
  </div>
</div>

<div class="p-col-12 p-md-12">
  <div class="margin">
    <h4>Valores no eixo X: {{requestNumber}}</h4>
    <p-slider [(ngModel)]="requestNumber" (onSlideEnd)="handleChange($event)" [step]="20" [min]="10" max="2000"
      [style]="{'width':'100%'}"></p-slider>
  </div>
</div>

<div class="p-col-12 p-md-12">
  <p-panel header="Corrente">
    <p-chart type="line" [data]="lineChartData" [options]="options"></p-chart>
  </p-panel>
</div>

<div class="p-col-12 p-md-12">
  <p-panel header="Diferença de Temperatura Interna e Externa">
    <p-chart type="bar" [data]="barChartData" [options]="options"></p-chart>
  </p-panel>
</div>
`

result:

image

I've tryied diverses combinations but none of primeflex has done effect. The result is always the same as the pic.

HenriquePereiraRosa avatar Sep 23 '18 17:09 HenriquePereiraRosa

I had the same problem. After adding the "node_modules/primeflex/primeflex.css" file into the project solved my problem. Try with same thing, hope it helps to you.

guptaG726 avatar Sep 24 '18 15:09 guptaG726

Is there already:

image

Right?

I'm also have included the path adress in "angular.cli" today but has no effect too.

"options": { "main": "src/test.ts", "karmaConfig": "./karma.conf.js", "polyfills": "src/polyfills.ts", "tsConfig": "src/tsconfig.spec.json", "scripts": [ "node_modules/chart.js/dist/Chart.js" ], "styles": [ "node_modules/ng2-toasty/style-bootstrap.css", "node_modules/font-awesome/css/font-awesome.min.css", "node_modules/primeng/resources/themes/omega/theme.css", "node_modules/primeng/resources/primeng.min.css", "src/styles.css" ], "assets": [ "src/assets", "src/favicon.ico" ]

HenriquePereiraRosa avatar Sep 24 '18 15:09 HenriquePereiraRosa

It's working... I think that was the missing declaration in angular.json. Now started to work. Thanks!

HenriquePereiraRosa avatar Sep 24 '18 16:09 HenriquePereiraRosa