Snippets Collections
#add customElement pkg to blazor web assembly app 

#create custom element component in Program.cs
builder.RootComponents.RegisterCustomElement<Counter>("cus-ele");

#define Razor @code
<h1>@Title</h1>

<p role="status">Current count in Razor: @currentCount</p>
<p>Increment amount in Razor: @IncrementAmount</p>

<button class="btn btn-primary" @onclick="IncrementCount">Click me in Razor</button>

@code {
    private int currentCount = 0;

    [Parameter] public string Title { get; set; } = "Blazor Counter";
    [Parameter] public int? IncrementAmount { get; set; }

    private void IncrementCount()
    {
        currentCount += IncrementAmount.GetValueOrDefault(1);
    }
}

**************

#create proxy file w/ dotnet generated url 
{
  "/": { "target": "https://localhost:44355/", "secure": false}
}

#create separate angular app
@Component({
  selector: 'app-root',
  template: `
    <div class="content">
      <h1>Welcome to {{title}}! from Angular Code</h1>
      <p>This is an Angular application that can also host Blazor components.</p>
      <p>
        <button (click)="addBlazorCounter()">Add Blazor counter from angular</button>
        <button (click)="removeBlazorCounter()">Remove Blazor counter from angular</button>
      </p>
      <div *ngFor="let counter of blazorCounters">
        <cus-ele [attr.title]="counter.title"
                    [attr.increment-amount]="counter.incrementAmount">
        </cus-ele>
      </div>
    </div>
  `,
  styles: []

})
export class AppComponent {
  title = 'ng-custom-ele';

  blazorCounters: any[] = [];
  nextCounterIndex = 1;

  addBlazorCounter() {
    const index = this.nextCounterIndex++;
    this.blazorCounters.push({
      title: `Angular sent Counter ${index} input from angular to Razor @code`,
      incrementAmount: index,
    });
  }

  removeBlazorCounter() {
    this.blazorCounters.pop();
  }
}
{
  "name": "My extension",
  ...
  "content_scripts": [
    {
      "matches": ["http://*.nytimes.com/*"],
      "exclude_matches": ["*://*/*business*"],
      "js": ["contentScript.js"]
    }
  ],
  ...
}
star

Tue Jun 20 2023 19:39:39 GMT+0000 (Coordinated Universal Time) https://www.remove.bg/upload

#design #tasktools #designtools #image #image_edit #webassembly
star

Sat May 27 2023 06:55:15 GMT+0000 (Coordinated Universal Time) https://www.youtube.com/@1_SUB_TO_PANDA-MAN/about

#webassembly
star

Tue Apr 04 2023 08:04:49 GMT+0000 (Coordinated Universal Time) https://www.opris.exchange/binance-clone-script/

#webassembly #javascript #nodejs
star

Thu Jul 21 2022 14:09:23 GMT+0000 (Coordinated Universal Time) https://www.syncfusion.com/blogs/post/create-custom-elements-with-blazor-webinar-show-notes.aspx

#webassembly
star

Sat Apr 24 2021 20:22:54 GMT+0000 (Coordinated Universal Time) https://www.hulu.com/watch/4e5bc050-7302-4793-b2c9-031f7f03295c

#actionscript3 #javascript #objectivec #typescript #webassembly #html #censored #profanity #webfiltered
star

Sat May 09 2020 12:31:59 GMT+0000 (Coordinated Universal Time) https://developer.chrome.com/extensions/content_scripts

#C #C# #webassembly

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension