JavaScript interface for Xamarin.Forms
This nuget package contains necessary JavaScript bridge and Sample to execute Web Atoms JavaScript components with Xamarin.Forms.
How to run..
public partial class App : Application
{
public App ()
{
InitializeComponent();
MainPage = new NavigationPage( new ContentPage {
Title = "Loading..",
Content = new Label {
Text = "Loading..."
}
});
// override bridge... if you want to override any methods...
// DependencyService.Register<AtomBridge, AppBridge>();
#region Design Time
// Module Loader URL (only needed if Components are not packed)
// AtomBridge.AmdUrl = "https://cdn.jsdelivr.net/npm/web-atoms-amd-loader@1.0.360";
// DependencyService.Get<NavigationService>().SetLocation("https://www.webatoms.in/xf/samples.js");
#endregion
// Packed JavaScript file
DependencyService.Get<NavigationService>().SetLocation(
// Packed JavaScript file location
"https://www.webatoms.in/xf/samples.pack.js",
// UI Component module name to load
"@web-atoms/samples/dist/xf/Samples"
);
}
}