Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
manfred
@manfroshii_gitlab
Hello! Does anyone have a good course about using angular_router?
stanislasdrg
@stanislasdrg
@ccfiel I have found the Tour of Heroes to be an excellent ressource. If you come from Angular Ts, things are a lot more simple in Dart
I also recommend that you get familiar with Dart Streams fairly quickly as RxDart is built on top of them.
A good ressource is : https://rxmarbles.com/
And the official Dart documentation
stanislasdrg
@stanislasdrg
The other source of difficulty I dealt with was with porting Auth0 ts library to Dart.
Generally, be prepared to dive into the APIs in order to discover things.
@manfroshii_gitlab Tour of heroes tutorial has some good examples about routing too. For edge cases I recommend checking examples on Github or Stackoverflow.
Emmanuel Belair
@e-belair
Hi everyone, Is there a way to make a Material Chips Autocomplete like this in Angular-dart ?
stanislasdrg
@stanislasdrg
@e-belair It definitely looks doable :
<mat-form-field class="example-chip-list">
  <mat-chip-list #chipList aria-label="Fruit selection">
    <mat-chip
      *ngFor="let fruit of fruits"
      [selectable]="selectable"
      [removable]="removable"
      (removed)="remove(fruit)">
      {{fruit}}
      <mat-icon matChipRemove *ngIf="removable">cancel</mat-icon>
    </mat-chip>
    <input
      placeholder="New fruit..."
      #fruitInput
      [formControl]="fruitCtrl"
      [matAutocomplete]="auto"
      [matChipInputFor]="chipList"
      [matChipInputSeparatorKeyCodes]="separatorKeysCodes"
      [matChipInputAddOnBlur]="addOnBlur"
      (matChipInputTokenEnd)="add($event)">
  </mat-chip-list>
  <mat-autocomplete #auto="matAutocomplete" (optionSelected)="selected($event)">
    <mat-option *ngFor="let fruit of filteredFruits | async" [value]="fruit">
      {{fruit}}
    </mat-option>
  </mat-autocomplete>
</mat-form-field>
Chips and autocomplete are both available in angular_components
Emmanuel Belair
@e-belair
@stanislasdrg which angularDart library are you using to do this?
stanislasdrg
@stanislasdrg
angular_components
It is the material lib for Dart
Emmanuel Belair
@e-belair
I'm working with angular_component
Emmanuel Belair
@e-belair
I don't know this syntax
stanislasdrg
@stanislasdrg
What I meant is that autocomplete chips is not a specific component.
Emmanuel Belair
@e-belair
So how can I implement <mat-chip-list> tags?
stanislasdrg
@stanislasdrg
In Angular Ts it is partly built from mat-autocomplete and mat-chip. It should therefore be doable in Dart as the same components are available
You would probabby have to build it yourself
Emmanuel Belair
@e-belair
Ok I'll try thanks
Emmanuel Belair
@e-belair
Really huge work to implement it though ...
stanislasdrg
@stanislasdrg
Yep, maybe it is something Skawa compoenents would be keen on adding ?
Emmanuel Belair
@e-belair
I found a tricky solution by using material-chips & material-auto-suggest-input
image.png
Now I need to align the text input with the chips element
Emmanuel Belair
@e-belair
image.png
andesappal
@andesappal
How do I reload my index.html onto Chrome in the case where I don't have a play button in my IDE? I'd like to just press reload on Chrome. This is for a colleague.
Emmanuel Belair
@e-belair
Hi I need to Highlight text in a template but the replace pipe escape the html:
{{chip.uiDisplayName | replace:chipText:'<b>'+chipText+'</b>'}}
How can I use the replace pipe without escaping html? Or there is an alternative solution?
Emmanuel Belair
@e-belair
Finally I've made my own pipe
stanislasdrg
@stanislasdrg
Very nice @e-belair
Emmanuel Belair
@e-belair
@stanislasdrg Thank you :-) If I have some time, I'll share it as component
stanislasdrg
@stanislasdrg
Anyone knows of a carousel component in Dart ?
Surprise surprise, material_components does not have it.
stanislasdrg
@stanislasdrg
My bad, just seen the question earlier in the thread
Emmanuel Belair
@e-belair
:D I would say no by default
Emmanuel Belair
@e-belair
Is there a way to generate html from a template in dart?
I would like to generate a mail html body by parsing a template file
Jacob MacDonald
@jakemac53
There is a mustache template library I know
Emmanuel Belair
@e-belair
ha yes I already used that one time
@jakemac53 I don't want to bother you with that but did you take a look on my ticket on github?
Jonathan Rezende
@jodinathan
I use mustache as it is pretty much used by many mail sender
you can also create a normal page and use headless chrome to fetch the html after dart has been parsed
Emmanuel Belair
@e-belair
@jodinathan yeah I was thinking about the second option too, just make a div containing the parsed message
I was just wondering in a kind of parser was already existing before doing this
Emmanuel Belair
@e-belair
I found the mustache package, seems very usefull though