Git Product home page Git Product logo

ngx-structurals's People

Contributors

airblader avatar allcontributors[bot] avatar dependabot[bot] avatar snebjorn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ngx-structurals's Issues

ngxAlias doesn't infer type correctly

Given that isLoading$: Observable<boolean>.
Then as isLoading in the below template is inferred as type false | true | null. But it can never be null.

<ng-container *ngxAlias="(isLoading$ | async) === true as isLoading"></ng-container>

image

I'm reporting this here because *ngIf seems to work.

image

Not sure if the problem is with *ngxAlias or the Angular Language Service

Type error when using strictTemplates

Getting this type error when running with "angularCompilerOptions": { "strictTemplates": true }

ERROR in src/app/components/side-menu/side-menu.component.html:11:15 - error TS2322: Type 'string' is not assignable to type 'Observable<boolean>'.

11 <ng-container *ngxSubscribe="let isSideMenuCollapsed of isSideMenuCollapsed$">
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Component

export class SideMenuComponent {
  // type is Observable<boolean> and is coming from an Akita query
  public readonly isSideMenuCollapsed$ = this.sideMenuQuery.isSideMenuCollapsed$;

  ...
}

HTML

<ng-container *ngxSubscribe="let isSideMenuCollapsed of isSideMenuCollapsed$">
   ...
</ng-container>

UPDATE
This works
<ng-container *ngxAlias="isSideMenuCollapsed$ | async as isSideMenuCollapsed">
Perhaps it's not related to strictTemplates but me misunderstanding ngxSubscribe

Implement *ngxRange

*ngxRange="let value from 0 to 7 by 2"

Let's see if this would even ever be useful.

Package README

The README is currently on root level so Github can read it, but for npm we need to copy it into the dist folder before publishing.

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.