How to generate / adding new page using command in Ionic-react - ionic-framework

ionic g page topic
This command gives following error
[ERROR] Cannot perform generate for React projects.
Since you're using the React project type, this command won't work.
The Ionic CLI doesn't know how to generate framework components for
React projects.

The error message is pretty clear, the Ionic cli doesn't support generating new pages for a project that uses React. That means you'll have to create the files manually.

Related

Blazor Webassembly project calling REST API

I created a Blazor WebAssembly application and tried calling an external weather API for testing purposes. I put an XUnit test project in front of the WeatherService class that I created and the test execute successfully giving me the data.
When I run it from a Blazor component I see in the F12 developer tools console that the REST call executed.
But I see a bunch of errors in the Console.
It does not load the data on the page as expected. Has anyone faced this situation. I am running the latest template of the Blazor App built using VS 2019.
Also my Blazor Web Assembly app is not hitting any breakpoints, so I dont really know at what stage it is breaking.

mobilefirst js starts with ionic serve (WL is not defined)

Objective:
Get mfpjsloaded in document event
way to check: this.renderer.listen('document', 'mfpjsloaded', () => {}); in app.component.ts
Many get WL is not defined reference error using mobilefirst and ionic serve.
And i see no solution out there.
However, i have a project on hand that can start mfp script with ionic serve.
I am sorry that i cannot share code with you.
With a brand new project, i find i cannot start mfp script with ionic serve anymore.
Known workaround:
1. use mfpdev app preview
2. use emulator / device
**Please DO NOT suggest those in your reply
Finding:
To kick start mfp js, it needs worklight js to be run
Hope to see suggestions.
Thank you
This occurs if MFP components are not loaded before your execution starts to use MFP commands. The workaround is to ensure that you use MFP APIs only after MFP load is complete. This can be achieved in 2 ways :
Call MFP functions form within the function wlcommoninit() . Usage of this function would be similar to the usage in this link : https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/application-development/sdk/cordova/
Use the event 'mfpjsloaded'. Only after the trigger of this event, use MFP functionalities. This event can be used this way : document.addEventListener('mfpjsloaded', initWL, false);.
Add your MFP functions in initWL function.

Aurelia + JSPM + Typescript browser-side debugging

I has been experimenting with Aurelia build options vis-a-vis development/build workflow. We have concluded that we prefer that developers test the web site while it is bundled, versus serving up all the individual files to the browser. Additionally, we are using TypeScript. And we want have the browser-side debugging experience provided by source maps. I am working with what will be a large application with many Aurelia components, so the few seconds for the page to refresh during the active development change/refresh or watch cycle seems like it will add up. And it seems that if developers are working in the bundles that bundling issues will be discovered immediately.
Using the Aurelia-cli (v23), and creating a new project using TypeScript, then building creates RequireJS bundles and source maps work for browser debugging. That is, after running au run.
Using the skeleton-typescript-webpack starter project (downloaded two weeks ago), then running npm start also provides browser side debugging of typescript of webpacked bundles.
Using skeleton-typescript which uses jspm and systemjs, running gulp serve-bundle does not provide client side typescript debugging. However, gulp serve does provides client side debugging, but the site is not bundled. The only difference between those gulp tasks is that the site is bundled, versus unbundled.
So it seems that typescript source map client side debugging of bundled sites will work with Aurelia-cli and webpack, but not with jspm.
Our project was started based on the skeleton-typescript. Before we refactor the build workflow, I have attempted to figure out how to get jspm to support typescript debugging on the browser.
I've hunted the web, but did not find any clear direction, and did much experimentation with configuration settings with a trial and error approach, but cannot seem to get a bundled jspm site to allow the client side typescript debugging experience.
Is this a limitation of jspm or systemJS or the Aurelia-Bundler? Or is there some configuration setting, in config.js or bundles.js, I need to add to the skeleton-typescript starter project to get this to work?
Maybe your are not getting access to source maps. I'm not sure, I remenber something about the way how source map are generated, (inline, file in a specific folder) and add mapping path in the server to make them acessible.
https://github.com/aurelia/skeleton-navigation/blob/master/skeleton-typescript-aspnetcore/src/skeleton/Startup.cs#L69-L74

How to create a UWP Package that`s shipping Microsoft.NET.CoreRuntime.1.0 with it

I`m struggling with the following issue:
I try to deploy my uwp app with a Mobile Device Management System (MobileIron). it's only accepts .appxbundle, no .appxupload files. When i try to install/deploy the app on a device, i get the error
Can not install package XY because the package xy has a dependency to Microsoft.NET.CoreRuntime.1.0. This package is needed for the installation. Deploy this Framework together with your package
(my custom translation ;) )
The problem is, I dont know how to create a package, that's shipping the needed CoreRuntime within. When i create a DEBUG Package, i get a appxbundle and a folder with the missing CoreRuntime.appx, but only the powershell script is shipping the CoreRuntime Framework to the Device, not the bundle itself.
When i create a RELEASE Package, it`s running agains .NET Native, in this case i have no CoreRuntime...
Hope i explained my problem good enought and someone can help me or give me a hind.
You need to enable .NET Native, From your Project Properties:
Make sure that your configuration is for Release. And check
Compile with .NET Native tool chain
and
Optimize code
finally make sure to create your packages from Store->Create App Packages. With the following configurations:

Undesrscore.js library is not working with Ionic based MobileFirst project

I have created hybrid application with mobilefirst using ionic. I have included underscore.js library in my project. When I try to access methods of underscore, I get errors like underscore is not defined
If you mean that you have created an app using MobileFirst Studio - that is not the recommended path. The recommended path is to create a Cordova application using the MobileFirst CLI. You can then combine this with Ionic. This approach is more fool-proof.
You can follow these guides:
https://www.raymondcamden.com/2015/03/23/working-with-ibm-mobilefirst-and-the-ionic-framework/
https://mobilefirstplatform.ibmcloud.com/blog/2016/01/13/ionic-hybrid-mobile-app-using-mobilefirst-platform-7-1-cli/
Note that you did not mention the actual error you have received. Without this, the question is moot as there can be a number of possibilities. Please actually mention the error you got.