Angular 7 Dialog it works fine locally, but not work on Heroku

33 views
Skip to first unread message

AlMobarmig AlAraby

unread,
Oct 3, 2019, 1:41:24 AM10/3/19
to Angular and AngularJS discussion
I made o button to open dialog, it works fine locally, but when push it on heroku, it not work,
actually, it opens but not displayed, because when i click on it, dropdown opened, how i can fix it, please.

<div class="modal fade" id="AddCategory" tabindex="1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false">
  <div class="modal-dialog" role="document">
      <div class="modal-content">
          <div class="modal-header py-4">
              <h5 *ngIf="editCategory" class="modal-title" id="exampleModalLabel">تعديل تصنيف </h5>
              <h5 *ngIf="addCat" class="modal-title" id="exampleModalLabel">اضافه تصنيف </h5>
                <button type="button" class="close p-0 m-0" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="false">&times;</span>
                </button>
          </div>
          <div class="modal-body">
              <form [formGroup]="addCat_Form" (ngSubmit)="saveCat()">                
                  <div class="row no-gutters">
                      <div class="col-lg-11">
                          <div class="form-group">
                              <span class="required ml-2 ">*</span>
                              <label> التصنيف الرئيسي</label>
                              <select (change)="maxCode_subCat()" class="form-control px-3" formControlName="Related_CATKeyField" name="Related_CATKeyField">
              <option  > </option>            
                <option *ngFor="let maincat of mainCategory" value="{{maincat.id}}">{{maincat.CATArbName}}</option>
            </select>

                              <div *ngIf="Related_CATKeyField.touched && Related_CATKeyField.invalid" class=" p-0 errormassage mt-1">
                                  ادخل التصنيف الرئيسي
                              </div>
                          </div>
                      </div>
                      <div class="col-lg-1">
                          <button (click)="MainCat_Modal()" type="button" class="btn_add_tax text-white text-center" style="cursor: pointer">+</button>
                      </div>
                  </div>
                  <div class="form-group">
                      <span class="required ml-2 ">*</span>
                      <label> تصنيف المنتج الفرعي</label>
                      <input type="text" class="form-control" formControlName="CATArbName" name="CATArbName">
                      <div *ngIf="CATArbName.touched && CATArbName.invalid" class=" p-0 errormassage mt-1">
                          ادخل التصنيف الفرعي
                      </div>
                  </div>
                  <div class="form-group">
                      <img [src]="defaultCatImg" style="width: 250px;height:200px">

                      <div class="productimg  p-2">
                            <label for="upload" class="d-block text-center file-upload__label"> صوره تصنيف المنتج الفرعي </label>
                          <input id="upload" class=" file-upload__input " formControlName="CATPicture" (change)="handelCatImgInput($event.target.files)" type="file" accept="image/*">

                      </div>
                  </div>

                  <div class="row no-gutters">
                      <div class="col-lg-11">
                          <div class="form-group">
                              <label>   قيمه الضريبه</label>
                              <select class="form-control px-3 " formControlName="CATTax_TADKeyField" name="CATTax_TADKeyField">
                    <option> </option>
                    <option [value]="Tax.id"  *ngFor="let Tax of taxs">{{Tax.TADArbName}}</option>
                </select>
                          </div>
                      </div>
                      <div class="col-lg-1">
                          <button (click)="tax_Modal()" type="button" class="btn_add_tax text-white text-center" style="cursor: pointer">+</button>
                      </div>
                  </div>
                  <div class="modal-footer">
                      <button type="submit" [disabled]="addCat_Form.invalid" class="btn btn-save ml-3">حفظ </button>
                  </div>
              </form>
          </div>

      </div>
  </div>
</div>

Sander Elias

unread,
Oct 3, 2019, 4:40:43 AM10/3/19
to Angular and AngularJS discussion
Are there errors in the developer console when you are heroku?
I suspect you didn't copy all distribution files, or the folder layout is a bit different.

AlMobarmig AlAraby

unread,
Oct 4, 2019, 8:55:20 AM10/4/19
to Angular and AngularJS discussion
No errors in Console, 
i take all files from dist folder 
other information my backend is Django, so only DIST files i take it to my project static folder

AlMobarmig AlAraby

unread,
Oct 4, 2019, 8:59:27 AM10/4/19
to Angular and AngularJS discussion
i forgot to say that, my backend is Django,  so it is Django Angular Project, hosted on Heroku, so I just use files from DIST folder after running (ng build) and put it in Django Static Folder
Reply all
Reply to author
Forward
0 new messages