Is it possible to do a new sails app but have the indentation be 4 spaces? It seems it gets created with 2 spaces.
I am using sailsjs 1.0 - and currently I create app by doing:
sails new blah_name_here
Choose "Web App"
Related
I am developing a List Report app, using FIORI Elements. It should be capable of exporting the listed data to excel. For this reason, I have added the "useExportToExcel": true in the manifest. While testing it from the VS Code, since it is using latest SAPUI5 version, it is working fine. Yet, once app was deployed, the button is not present. I am assuming the issue is related version in the FES (currently running 1.52.18).
I understand that a button could be added and then do this but still I would like to leave it within the FE framework
Thanks and regards!
You could also add an extension to your project on the ListReport.
Under webapp folder it should create a subfolder ext/controller and the file "ListReportExt.controller.js" in it. You can verify in the manifest.json for the extension configuration.
Then in the lifecycle method "onInit" of the js file, access your SmartTable object by ID.
Use the method setUseExportToExcel(true) of the SmartTable. This should do the trick!
onInit: function() {
const oSmartTable = this.getView().byId(this.getView().getId() + "--table");
oSmartTable.setUseExportToExcel(true);
}
I'm trying to create a standard WebAPI project in .NET 6. I notice that the standard ApiController route doesn't have the leading api route that I like to have. When I add it, the controller breaks. It doesn't give me a 404 (not found), it just gives me that index page that says that I have to enable javascript. I'm really at a loss at what I have to do to make my app work where I can put api at the start of my routes:
[Route("api/[controller]")]
I've tried adding it to the default controller route map in different combinations. I've tried adding the UseEndpoints method in the Program class. I'm just not sure what to differently in 6.
For those who want to "see my code", I'm just using the standard WebAPI project w/ React (NO Redux!).
Check the new setupProxy.js file image description inside the ClientApp folder, you need to configure the backend routes in the proxy config, I had a similar issue with the ASP.NET Core 6.0 with Angular project template, you can find more information here link 1 link 2
I cloned polymer starter kit 1.0 and its working perfectly fine only if the url is : localhost:8080. When I tried with Eclipse and Apache Tomcat 8.0 to build a Java MVC application then URL would be as : localhost:8080/project-name.
Now the behaviour of the page navigation changed dramatically. When I start the project the URL comes as: localhost:8080/project-name/#!/project-name
But it should come like: localhost:8080/project-name and should show home page and on clicking on users or contact tab the url should be :
localhost:8080/project-name/#!/users
localhost:8080/project-name/#!/contact
but it is showing like:
localhost:8080/project-name/#!/project-name/users
localhost:8080/project-name/#!/project-name/contact
I tried to make app.baseUrl =" ";. Changed the routing.html routing for home to empty or '*'but nothing worked.
Any help would be highly appreciated.
Thanks.
You must deploy your app as "ROOT.war" to hide the projects context. The name of your project is deployed as the "context" in the URL.
Naming your app ROOT simply tells Tomcat it is the main app to run and you will indeed get below as your projects context.
localhost:8080
Don't worry about the Tomcat homepage, I simply rename it to "ROOT-1" when I really want to keep it. Also don't worry about the context while running in eclipse because it would awkward to test your app as ROOT. Just rename the .war to ROOT before launch.
When you see the "#" it usually means your are navigating to some point in an html file, i.e. looks like your app is SPA.
"#!/appComponent"
The line below simply looks like you have a SPA style page with the same name as your project with all the other pages inside of it.
localhost:8080/project-name/#!/project-name/users
I have been trying to work on a facebook IFrame app using Asp.NEt MVC and have not been that successful with it. Tried using the samples from facebook SDK however tags does not get recognized during development. Can some one share the code or point me to a working or preexisting facebook APP sample that would be of help. Thanks.
I abstracted away everything directly related to facebook in the Debug config my local machine. The Release config contains the facebook related stuff. I use Unity for DI, so I have DEBUG conditionals that configure different concrete implementations of interfaces.
#if DEBUG
LifetimeManager lifetimeManager = new ContainerControlledLifetimeManager();
container.RegisterType<ISteamRepository, MockSteamRepository>(lifetimeManager);
container.RegisterType<IFacebookContextSettings, MockFacebookContextSettings>();
#else
container.RegisterType<ISteamRepository, SteamRepository>();
container.RegisterType<IFacebookContextSettings, FacebookContextSettings>();
#endif
My project is open source, you can see more at http://code.google.com/p/facebooksteamachievements/
What I am trying to achieve is for the application icon to be different in builds that I send out to my beta testers, to that of the application that will be submitted for approval. This will allow me and my beta testers to easily identify the app is a beta version.
I was not sure if I should be adding a build script to modify the info.plist and change the application icon specified there. For this I guess I would have to conditional check the build type (DEBUG/RELEASE/DISTRIBUTION etc) and write the appropriate value to the plist file.
Alternatively I thought I might need to create a separate target for beta releases and specify the new BETA application icon there.
If anyone has done this kind of procedure before, any tips and ideas about how best to do it would be very much appreciated.
Outdated: As of September 2017, my answer is probably outdated now. Please use latest Apple developer guides relating to Asset Catalogs. Asset Catalogs are the new way of specifying image/icon resources for your app.
Original answer:
Both ways you have mentioned can be used for this purpose (Through a separate Target or using Build settings). In my opinion, the more logical way would be to use a different build configuration and set the plist file to dynamically get the icon file name from the build configuration.
Here is how I would do it:
In project build settings, create a new user-defined variable called ICON_FILE (for "All Configurations")
Set the value of the variable to "Icon.png" (for "All Configurations")
Create a new build Configuration called "Beta".
Set the value of the ICON_FILE variable to "Icon-beta.png" for "Beta" configuration.
(this will make all the configurations have the value "Icon.png" except Beta config)
In the Info.plist set the value of "Icon file" attribute to ${ICON_FILE}. This will make the info.plist dynamically get the filename from the variable you defined earlier.
In your application resources, include the beta icon with the name "Icon-beta.png" in addition to "Icon.png" you already have.
If you build the app using "Beta" config, the app will have the beta icon as the app icon.
Hope this helps!
Asset catalogs can be used without creating another target.
Here are the steps I use:
1 - Create two (or more) app icon set in images.xcassets
2 - Create another configuration from project settings
3 - Go to Target -> Build Settings and search for app icon.
You will see Asset Catalog App Icon Set Name under Asset Catalog Compiler - Options. Change the asset catalog name that will be used in new configuration.
4 - Build for different configurations.
The accepted answer is not working for xcassets.
So, if you already started to use xcassets catalog here is the steps:
You need to create 2 different targets of your application.
To do this:
Right click on your target. -> Click Duplicate (or Cmd+D)
Set name of new target like MyApp-beta
Create separate icon:
Go to your xcasset catalog.
Right click on column with list of images -> click New App Icon
Name it like icon-beta, add place here your beta icons
Click on your beta-target
Go to tab General -> App Icons -> select your asset icon-beta
Here it is. Now you can build your beta application!
Another advantage of this method over that described in the accepted answer - is that you can install both versions at the same time of your Application. (you need to set different Bundle Identifier for this).