Search code examples
ng-zorro-antdng-zorro-mobile

How to use both nz-zorro libraries for large screen and for mobile in the same application?


NZ Zorro has 2 nice layout angular libraries, the large screen and the mobile versions. Do I need to create 2 applications, one for large screen and the other for mobiles? Is there a way to use both libraries in the same angular application?

Thanks for helping


Solution

  • You should never do two codebases. You should follow responsive patterns. You need to render content based on the use case.

    One very handy library in angular is https://github.com/angular/flex-layout. It has conditional directives example :

    enter image description here

    You can hide/show divs based on if you are on mobile(xs).