Base solution for your next web application
Open Closed

Some bugs in Angular2 Project #2315


User avatar
0
cangunaydin created

Hello, I have found couple of things in the angular2 ui project. I have just wanted to share it. Inside change-profile-picture-modal.component.html 2 things i realized. First one is saving variable which do not exist in the component.ts and the second thing is hide() function probably it should be close() function.


3 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Thanks for sharing. Do you have the latest angular2 template ? We made some changes before releasing it and change-profile-picture-modal.component.ts contains close function now, <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/blob/c2f52042bd74e1d29674b33f4a75dde944441fd2/angular/src/app/shared/layout/profile/change-profile-picture-modal.component.ts#L98">https://github.com/aspnetzero/aspnet-ze ... ent.ts#L98</a>.

    I couldn't understand the first problem about saving, can you explain it a bit more detialed ? Or you can show it in these files <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/blob/c2f52042bd74e1d29674b33f4a75dde944441fd2/angular/src/app/shared/layout/profile/change-profile-picture-modal.component.ts">https://github.com/aspnetzero/aspnet-ze ... mponent.ts</a> <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/blob/c2f52042bd74e1d29674b33f4a75dde944441fd2/angular/src/app/shared/layout/profile/change-profile-picture-modal.component.html">https://github.com/aspnetzero/aspnet-ze ... onent.html</a>

    Thanks.

  • User Avatar
    0
    cangunaydin created

    Actually i was talking about the .html file

    <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/blob/c2f52042bd74e1d29674b33f4a75dde944441fd2/angular/src/app/shared/layout/profile/change-profile-picture-modal.component.html">https://github.com/aspnetzero/aspnet-ze ... onent.html</a>

    below here you can see that you are calling hide() function which is not in component.ts

    <button type="button" class="close" aria-label="Close" (click)="hide()">
              				<span aria-hidden="true">&times;</span>
            			</button>
    

    And when i run the project it doesn't close the modal when i click that. I have the latest version that i have downloaded 2 days ago.

    Also saving variable is in .html file, you can see it below.

    <button type="button" class="btn default close-button" (click)="close()" [disabled]="saving">{{l("Cancel")}}</button>
    					<button type="submit" class="btn blue save-button" [disabled]="!changeProfilePictureModalForm.form.valid || saving"><i class="fa fa-save"></i> <span>{{l("Save")}}</span></button>
    

    but there is no variable called saving in the component.ts.

    If it is global or coming from the inherited class i don't know but on click it doesn't close the modal for sure in my app :)

  • User Avatar
    0
    ismcagdas created
    Support Team

    Thanks, now it is very clear :). I created an issue for this, we will fix it soon <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/issues/36">https://github.com/aspnetzero/aspnet-ze ... /issues/36</a>.