Git Product home page Git Product logo

ask-me-smt's Introduction

ask-me-smt's People

Contributors

tieppt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ask-me-smt's Issues

Tối ưu performance trong ứng dụng nhiều tab nội dung

Hiện tại em đang làm ứng dụng app quản lý cho phép mở được nhiều tab và giữ được state của các tab khi chuyển tab thông thường (giống tab trình duyệt) đồng thời cũng có thể emit event giữa các tab (ví dụ: màn danh sách -> sang màn chi tiết 1 bản ghi cập nhật -> cập nhật xong đóng màn cập nhật trờ về màn search và search lại).
Hiện em đang làm là chỉ ẩn các tab bằng style thì việc chuyển tab ok nhưng nhiều tab là sẽ rất nặng.
Còn việc chỉ giữ 1 màn đang active thì việc chuyển tab k dc như ý muốn.
Không biết cách nào tốt hơn để xử lý k ạ. em xin cám ơn

Có phải tất cả mọi thứ đều nên được unsubscribe

Đây là code sử dụng modal ngbootstrap, trong đoạn modalReference em có implement cho sự kiện submitform, Em có đặt ra câu hỏi ở dưới, Trong trường hợp này có nhất thiết phải unsubscribe không? Hoặc có cách nào để mình xử lý thêm ở thằng modalservice cho những thằng đang inject nó. Đây là đoạn sample như này.

constructor(private modalService: NgbModal){}

openDialog() {
    const modalRef = this.modalService.open(
      AComponent,
      this.optionsModal
    );
    modalRef.componentInstance.reasons = this.BService.reasons.getDataSource();
    modalRef.componentInstance.submitForm
.pipe(takeUntil(this)) 
// - Có nhất thiết phải unsub ở đây không ạ? hay có cách nào đó để mình xử lý ở modal service. 
// - takeUntil nó được chạy khi nào ạ! 
.subscribe(event => {
     // code here
});
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.