Friendly URLs in Ionic Framework - ionic-framework

Are there friendly URLs in Ionic Framework? I tried to use ion-nav and ion-tabs components and my URL does not change if I navigate to pages
this.nav.push(Page1);
// or
this.nav.setRoot(Page1);
URL is always http://localhost/ (I need http://localhost/page1, http://localhost/page2 etc)

Unfortunately, the short answer is no. There is probably some scripting work-around that might be able to mimic this kind of behavior, but it is not something that is native to the framework.
The Ionic Navcontroller uses html5 to transition between pages like a phone app instead of a desktop web browser.
What I would suggest is this:
Build a debug-only page that has launch buttons to all of the pages that you want to go to directly. Set this as the root page when you enter the app, and add to it as you bring in more pages. (In fact, these debug pages morph into my "secret pages" during development where I hide useful information for future debugging)
This is what my current one looks like:
That's probably the closest to what you want using the native tools. Good Luck!

Related

Advanced features with Flutter Driver (or Silenium/Ghost Inspector)

Looking for a UI integration test strategy for Flutter. We'd love to use Silenium/Ghost Inspector but seems that is not practical due to lack of html id's or CSS classes in Flutter (Add id or name property or other means of identification for Flutter Web applications?). Or has anyone found a way round that?
In the meantime Flutter Driver has only very basic documentation for simple tests like finding a button and pressing the button. Anyone know if I can do other operations like navigate to a specific page (e.g. using a # url fragment), test a link which leads to an external site, check visual setup of the page against an image, and other such tests which would be standard in Silenium and the like.
Thanks!!
Well seems Flutter Driver is still very limited so I have instead found a strategy for using Selenium, posted full details here:
Strategy to use Selenium browser testing with Flutter Web apps

iPhone Stylesheet or JS

I downloaded a template and customised it a bit. It's working well but the template has a kind of mobile style sheet. When I open the webpage with the iPhone, it looks great on the homepage. However, on the most important pages I don't want it to appear for mobile I want it to appear like it would on a browser.
I've tried.
Deleting the: style-mobile.css file. - Nothing happened.
Playing around with the style-mobile.css file. - Nothing!
Deleting some js files.
I can't seem to find the code that is telling my iPhone to open the page like an iPhone instead of opening it like a browser.
Where will I find this??
The idea that you can download an arbitrary HTML/CSS/JS(?) template that is designed for mobiles and have it magically adapt to look right in a classic browser window is .... naive.
Either look for a template that is designed to look good in both contexts, or build your own layouts using something like Twitter Bootstrap which is responsive to differences in the display port size.

Best framework for embedding HTML pages in an iphone app?

I am developing an app which has a significant 'reference' section in it. It's information that is very applicable to being created as a set of HTML pages, linking to each other.
I am wondering if anyone knows of a good framework out there to embed HTML pages within an iphone app, to be able to open a specific page by key and any other niceties. The best I've seen so far is CMHTMLView on github.
I know I can load HTML pages directly into a UIWebView, I'm looking to see if there's a framework which does a bit of the boilerplate for for me (e.g. checking for existance of files, be able to cache pages by a keyword, any other niceties like being able to index and search pages). Thanks!
To display easy to navigate HTML in a mobile, I use http://jquerymobile.com

Google web toolkits - multiple pages

On the google website there an example of a simple GWT appliatoin, following is a link:
http://code.google.com/webtoolkit/doc/1.6/tutorial/create.html
The above application has a host page:StockWatcher.html
and StockWatcher.java is the entry point.
If I wanted to add more html pages to this application, we keep one single host page and the entry point will add different panels depending on which link the user clicked on? In this case, how to know which link the user clicked on? If I create a navigation panel and each link has a request parameter, then after the user clicks on the link, How to get the request parameter?
Are there any tutorials available online on how to create a fully functional application? The one example google provides is too simple.
Thanks so much in advance
You have two options to have multiple page web application using gwt.
1) Use gwt history feature and listen for the history change. In this approach at the initial page load itself browser downloads all the javascripts(Including the widgets which are not useful in current link). Still this can be avoided by using gwt code splitting.
2) Create multiple modules. In this case you have to create multiple html pages and GWT entry points. For each major functionality create a gwt module and link that with [modulename].html file. In this approach browser downloads only particular feature's javascript. Not all the javascripts.
Based on your application requirement you can pick one of the option. IMHO I would suggesst second option.

What is the current proper way of creating Facebook Tab's with interaction?

I need to create an interactive Facebook Tab for a client, similar to this:
http://www.facebook.com/#!/knnktr.
The application has a number of slides, which are basically images that will scroll left/right as the visitor clicks on two arrows on either side of the displayed image.
I could do this in Flash, but I could also attempt doing this with JavaScript.
Now, I understand that Facebook's APIs often change, and iframe's are currently not an option.
What is the best/correct way to achieve this. Should I stick with the Static FBML? If we have an option to use JavaScript, we'll prefer that above Flash. The question is, does the Static FBML limit the ability to perform some JavaScript calls.
I need to respond to mouse clicks, and I also need to be able to make remote AJAX requests to our server.
If you're building a tab, FBML/FBJS are your only option. The official FB docs for FBJS are pretty good: http://developers.facebook.com/docs/fbjs/
A couple caveats about FBJS:
They rewrite your Javascript to only allow limited functionality. If you're used to a nice Javascript lib like jQuery you're out of luck.
You can't use external js includes, the Javascript must be in the same page
Take a look at the event, animate and AJAX sections in the docs. Taking a quick look at your example I don't see anything you couldn't do with FBJS.