Tag: Load without name on () return try style class gets
1.angular Call client method placed in try Catch
try {
Js_invoke.showsharedialog (Angular.tojson (obj)); Here's how you can put the client
} catch (e) {
Console.log (' recommend share ', obj);
}
2. The client calls the angular method, noting that the method needs to be global for the normal call
Declaring the method in the home index.html
var goBack = function () {return false};
On the page of the specific call, use
GoBack = function () {
return true;
};
First of all, angular call the customer service side Getwebtitle method on each page to return the method that the client needs to display the caption (Getwebtitle is the method defined for Android iOS)
Defining methods
function Initpagetitle (title) {var records = {name:title}; Try Catch (e) {}} $scope. $on ('$ionicView. Enter', function () { // Enter the page and call this is the method of ionic initpagetitle (" home "// can be called before entering the page });
There is no problem in Android such calls, except for the first entry in iOS.
It is important to note that for the first time, since the page has not finished loading the method has been executed so that the title of iOS returned directly is empty, to solve the problem requires iOS to actively call Angualrjs after the page load is completed get to the title
Home add var iospagetitle = function () {};
Write Iospagetitle = function () {Initpagetitle ("home page") in the controller of the homepage;
This allows the active call to the angular method after the iOS load is complete to ensure that the caption is displayed
Android iOS and Angularjs call each other to resolve the issue of the first call to iOS delivery header failed