Rectangle 27 38

For anyone might be interested, I ended up creating a custom view that looks like the system push banner on the top but adds a close button (small blue X) and an option to tap the message for custom action. It also supports the case of more than one notification arrived before the user had time to read/dismiss the old ones (With no limit to how many can pile up...)

[AGPushNoteView showWithNotificationMessage:@"John Doe sent you a message!"];

And it looks like this on iOS7 (iOS6 have an iOS6 look and feel...)

iphone - Get push notification while App in foreground iOS - Stack Ove...

iphone ios objective-c push-notification
Rectangle 27 38

For anyone might be interested, I ended up creating a custom view that looks like the system push banner on the top but adds a close button (small blue X) and an option to tap the message for custom action. It also supports the case of more than one notification arrived before the user had time to read/dismiss the old ones (With no limit to how many can pile up...)

[AGPushNoteView showWithNotificationMessage:@"John Doe sent you a message!"];

And it looks like this on iOS7 (iOS6 have an iOS6 look and feel...)

iphone - Get push notification while App in foreground iOS - Stack Ove...

iphone ios objective-c push-notification
Rectangle 27 17

For anyone might be interested, I ended up creating a custom view that looks like the system push banner on the top but adds a close button (small blue X) and an option to tap the message for custom action. It also supports the case of more than one notification arrived before the user had time to read/dismiss the old ones (With no limit to how many can pile up...)

[AGPushNoteView showWithNotificationMessage:@"John Doe sent you a message!"];

And it looks like this on iOS7 (iOS6 have an iOS6 look and feel...)

objective c - iOS - Push notification alert is not shown when the app ...

ios objective-c iphone push-notification uialertview
Rectangle 27 17

For anyone might be interested, I ended up creating a custom view that looks like the system push banner on the top but adds a close button (small blue X) and an option to tap the message for custom action. It also supports the case of more than one notification arrived before the user had time to read/dismiss the old ones (With no limit to how many can pile up...)

[AGPushNoteView showWithNotificationMessage:@"John Doe sent you a message!"];

And it looks like this on iOS7 (iOS6 have an iOS6 look and feel...)

objective c - iOS - Push notification alert is not shown when the app ...

ios objective-c iphone push-notification uialertview
Rectangle 27 20

There are a bunch of libraries out there add a FAB(Floating Action Button) in your app, Here are few of them i Know.

xml - How to create a floating action button (FAB) in android, using A...

android xml
Rectangle 27 2

enter code here

1. register the controller to the notification

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    // Keyboard events
    [[NSNotificationCenter defaultCenter] addObserver:self
                                         selector:@selector(keyboardWillShow:)
                                             name:UIKeyboardWillShowNotification
                                           object:nil];

    [[NSNotificationCenter defaultCenter] addObserver:self
                                         selector:@selector(keyboardWillHide:)
                                             name:UIKeyboardWillHideNotification
                                           object:nil];
}

2. don't forget to remove the controller from the notification centre

-(void)viewWillDisappear:(BOOL)animated
{
    [super viewWillDisappear:animated];
    [self.view endEditing:YES];
    [[NSNotificationCenter defaultCenter] removeObserver:self];
}

3. implement keyboard notification handlers

- (void)keyboardWillShow:(NSNotification *)notification {

// create custom button
    UIButton *doneButton = [UIButton buttonWithType:UIButtonTypeCustom];
    doneButton.frame = CGRectMake(0, 107, 106, 53);
    [doneButton setTitle:@"Done" forState:UIControlStateNormal];
    [doneButton addTarget:self  action:@selector(doneButton:)forControlEvents:UIControlEventTouchUpInside];

// save the reference to the button in order to use it in keyboardWillHide method
   self.donekeyBoardBtn = doneButton;

// to my mind no need to search for subviews
   UIWindow *windowContainigKeyboard = [[[UIApplication sharedApplication] windows]  lastObject];
   [windowContainigKeyboard addSubview:self.donekeyBoardBtn];
   self.donekeyBoardBtn.frame = CGRectMake(0., CGRectGetHeight(w.frame) -  CGRectGetHeight(self.donekeyBoardBtn.frame), CGRectGetWidth(self.donekeyBoardBtn.frame), CGRectGetHeight(self.donekeyBoardBtn.frame));
}

- (void)keyboardWillHide:(NSNotification *)notification {

    [self.donekeyBoardBtn removeFromSuperview];
}

4. implement done button action

- (void)doneButton:(id)sender{
   // add needed implementation
      [self.view endEditing:YES]; 
}

I implemented your answer very similar to what I have to do. Thanks. But button do not come as an animated object, when keyboard show.

iphone - How to add a 'Done' button to numpad keyboard in iOS - Stack ...

ios iphone cocoa-touch uitextfield uikit
Rectangle 27 1

<android.support.v4.widget.DrawerLayout
...
>
...
          <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            >

            <!-- The ActionBar displayed at the top -->
            <include
                android:id="@+id/actionBar" // Add this
                layout="@layout/action_bar" 
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />

            <!-- The main content view where fragments are loaded -->
            <FrameLayout
                android:background="@color/whitesmoke"
                android:id="@+id/main_content"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_below="@id/actionBar" // Add this
             />

            <android.support.design.widget.FloatingActionButton
                android:layout_alignParentRight="true" // Add this
                android:layout_alignParentBottom="true" // Add this
                android:id="@+id/fb_office_btn"
                android:src="@android:drawable/ic_menu_edit"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content" />
        </RelativeLayout>
...
</android.support.v4.widget.DrawerLayout>

OR you can follow the Android Studio design

<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    tools:context=".ui.activities.MainActivity">

    <android.support.design.widget.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:theme="@style/AppTheme.AppBarOverlay">

        <android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="?attr/colorPrimary"
            app:popupTheme="@style/AppTheme.PopupOverlay"/>

    </android.support.design.widget.AppBarLayout>

    <include layout="@layout/content_main"/>

    <android.support.design.widget.FloatingActionButton
        android:id="@+id/feedback_fab"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom|end"
        android:layout_margin="@dimen/fab_margin"
        android:src="@drawable/ic_fab_feedback"/>

</android.support.design.widget.CoordinatorLayout>

Change the id of some component like your app. Hope this help

So how is my drawer layout ? I need navigation drawer as well. pls

LinearLayout
RelativeLayout

I have some comment // Add this in my RelativeLayout. Did you put it into your layout ?

Thanks so much. It worked perfectly. I m gonna upvote the answer.

Adding floating action button with drawable layout is not visible in A...

android
Rectangle 27 4

@Justin Pollard xml code works really good. As a side note you can add a ripple effect with the following xml lines.

<item>
    <ripple
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:color="?android:colorControlHighlight" >
        <item android:id="@android:id/mask">
            <shape android:shape="oval" >
                <solid android:color="#FFBB00" />
            </shape>
        </item>
        <item>
            <shape android:shape="oval" >
                <solid android:color="@color/ColorPrimary" />
            </shape>
        </item>
    </ripple>
</item>

xml - How to create a floating action button (FAB) in android, using A...

android xml
Rectangle 27 17

Everything you'll need is provided by the chrome.notifications API. E.g.:

{
    "manifest_version": 2,
    "name":    "Test Extension",
    "version": "0.0",

    "background": {
        "persistent": false,
        "scripts": [
            "./bg/background.js"
        ]
    },

    "browser_action": {
        "default_title": "Test Extension"
    },

    "permissions": ["notifications"]
}
var myNotificationID = null;

/* For demonstration purposes, the notification creation 
 * is attached to the browser-action's `onClicked` event.
 * Change according to your needs. */
chrome.browserAction.onClicked.addListener(function() {
    chrome.notifications.create("", {
        type:    "basic",
        iconUrl: "/path/to/notification/icon.png",
        title:   "REMINDER",
        message: "It's time to go to this super-cool site !\nProceed ?",
        contextMessage: "It's about time...",
        buttons: [{
            title: "Yes, get me there",
            iconUrl: "/path/to/yesIcon.png"
        }, {
            title: "Get out of my way",
            iconUrl: "/path/to/noIcon.png"
        }]
    }, function(id) {
        myNotificationID = id;
    });
});

/* Respond to the user's clicking one of the buttons */
chrome.notifications.onButtonClicked.addListener(function(notifId, btnIdx) {
    if (notifId === myNotificationID) {
        if (btnIdx === 0) {
            window.open("...");
        } else if (btnIdx === 1) {
            saySorry();
        }
    }
});

/* Add this to also handle the user's clicking 
 * the small 'x' on the top right corner */
chrome.notifications.onClosed.addListener(function() {
    saySorry();
});

/* Handle the user's rejection 
 * (simple ignore if you just want to hide the notification) */
function saySorry() {
    alert("Sorry to bother you !");
}

Thank you for your reply.I would check it

I just realized, it's you (again). So, what is not working ? The exact same code works fine for me. Do you get any errors ?

BTW, since you seem to have a lot of questions, I thought I'd just let you know it is customary to also upvote the accepted answer (or any other answer that you find useful or worth noting).

no.errors..but it is not working..

javascript - Is there any way to insert action buttons in notification...

javascript google-chrome google-chrome-extension notifications
Rectangle 27 3

If you want a separate Cancel Button(UIAlertActionStyleCancel) you can't change the background color of the cancel button. If it's your priority then you have to make your own custom View. Or else you can simply add a default action with the title "Cancel".

[alert addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleDefault handler:nil]]

(But it won't give you a separate button).

I have debugged the view hierarchy and found this.

ios - UIAlertController change background color of Cancel button for a...

ios objective-c uialertcontroller
Rectangle 27 1

**Local Notification with three button action for iOS8+

//Button : I TOOK IT , REMIND LATER , SKIP IT**

let completeAction = UIMutableUserNotificationAction()
        completeAction.identifier = "COMPLETE_TODO"
        completeAction.title = "I TOOK IT"
        completeAction.activationMode = .Background
        completeAction.destructive = true
        completeAction.authenticationRequired = false

        let remindAction = UIMutableUserNotificationAction()
        remindAction.identifier = "REMIND_TODO"
        remindAction.title = "REMIND LATER"
        remindAction.activationMode = .Background
        remindAction.destructive = false
        //  remindAction.authenticationRequired = false

        let skipAction = UIMutableUserNotificationAction()
        skipAction.identifier = "SKIP_TODO"
        skipAction.title = "SKIP IT"
        skipAction.activationMode = .Background
        skipAction.destructive = false
        skipAction.authenticationRequired = false


        let todoCategory = UIMutableUserNotificationCategory()
        todoCategory.identifier = "TODO_CATEGORY"
        todoCategory.setActions([completeAction, remindAction, skipAction], forContext: .Default)
        todoCategory.setActions([completeAction,remindAction,skipAction], forContext: .Minimal)


        if application.respondsToSelector("isRegisteredForRemoteNotifications")
        {

            let categories = NSSet(array: [todoCategory,todoVideoCategory])
            let types:UIUserNotificationType = ([.Alert, .Sound, .Badge])

            let settings:UIUserNotificationSettings = UIUserNotificationSettings(forTypes: types, categories: categories as? Set<UIUserNotificationCategory>)

            application.registerUserNotificationSettings(settings)
            application.registerForRemoteNotifications()

        }

    }

cocoa touch - Ask for User Permission to Receive UILocalNotifications ...

ios cocoa-touch notifications ios8 uilocalnotification
Rectangle 27 1

public class TestActivity extends Activity {

   GoogleAnalyticsTracker tracker;


      protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        tracker = GoogleAnalyticsTracker.getInstance();

        // Start the tracker in manual dispatch mode...
        tracker.startNewSession("UA-33332745-1", this);

        setContentView(R.layout.main);
        Button createEventButton = (Button)findViewById(R.id.NewEventButton);
        createEventButton.setOnClickListener(new OnClickListener() {

          public void onClick(View v) {
            tracker.trackEvent(
                "Clicks",  // Category
                "Button",  // Action
                "clicked", // Label
                77);       // Value
          }
        });

        Button createPageButton = (Button)findViewById(R.id.NewPageButton);
        createPageButton.setOnClickListener(new OnClickListener() {

          public void onClick(View v) {       
            // Add a Custom Variable to this pageview, with name of "Medium" and value "MobileApp"
            tracker.setCustomVar(1, "Medium", "Mobile App");        
            tracker.trackPageView("/testApplicationHomeScreen");
          }
        });

        Button quitButton = (Button)findViewById(R.id.QuitButton);
        quitButton.setOnClickListener(new OnClickListener() {

          public void onClick(View v) {
            finish();
          }
        });

        Button dispatchButton = (Button)findViewById(R.id.DispatchButton);
        dispatchButton.setOnClickListener(new OnClickListener() {

          public void onClick(View v) {
            tracker.dispatch();
          }
        });
      }


      protected void onDestroy() {
        super.onDestroy();
        // Stop the tracker when it is no longer needed.
        tracker.stopSession();
      }
    }

android - Google Analytics - Tracking Unknown - Stack Overflow

android google-analytics analytics google-analytics-api
Rectangle 27 14

At the time of asking, this was not possible using the provided API. UIUserNotificationAction objects only represented additional buttons you can add, but you cannot input text directly. For now, you should add a "Reply" button, and on tap, opens the app with the keyboard visible so users can reply.

With iOS 9 SDK, this is possible by setting UIUserNotificationActionBehaviorTextInput as the behavior of the notification action. Make sure to read the documentation for more information.

objective c - Adding text field in Remote Notification, iOS 8 - Stack ...

objective-c iphone cocoa-touch push-notification ios8
Rectangle 27 49

- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo  {
    application.applicationIconBadgeNumber = 0;             
    //self.textView.text = [userInfo description];
    // We can determine whether an application is launched as a result of the user tapping the action
    // button or whether the notification was delivered to the already-running application by examining
    // the application state.

    if (application.applicationState == UIApplicationStateActive) {                
        // Nothing to do if applicationState is Inactive, the iOS already displayed an alert view.                
        UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Did receive a Remote Notification" message:[NSString stringWithFormat:@"Your App name received this notification while it was running:\n%@",[[userInfo objectForKey:@"aps"] objectForKey:@"alert"]]delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
        [alertView show];          
    }    
}

This works. A little more info about what it does; when the application is in the foreground, a native UI alert box appears with the notification text within it (the title is a slightly larger bolded text, and the message is smaller text under that. An 'OK' button to dismiss is at the bottom). The option applicationIconBadgeNumber being set to 0 is to hide the number that appears on top of the app icon in Springboard (for example signifying number of unread messages in a mail app). In this example, I don't know if that option is even needed.

iphone - Get push notification while App in foreground iOS - Stack Ove...

iphone ios objective-c push-notification
Rectangle 27 47

- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo  {
    application.applicationIconBadgeNumber = 0;             
    //self.textView.text = [userInfo description];
    // We can determine whether an application is launched as a result of the user tapping the action
    // button or whether the notification was delivered to the already-running application by examining
    // the application state.

    if (application.applicationState == UIApplicationStateActive) {                
        // Nothing to do if applicationState is Inactive, the iOS already displayed an alert view.                
        UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Did receive a Remote Notification" message:[NSString stringWithFormat:@"Your App name received this notification while it was running:\n%@",[[userInfo objectForKey:@"aps"] objectForKey:@"alert"]]delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
        [alertView show];          
    }    
}

This works. A little more info about what it does; when the application is in the foreground, a native UI alert box appears with the notification text within it (the title is a slightly larger bolded text, and the message is smaller text under that. An 'OK' button to dismiss is at the bottom). The option applicationIconBadgeNumber being set to 0 is to hide the number that appears on top of the app icon in Springboard (for example signifying number of unread messages in a mail app). In this example, I don't know if that option is even needed.

iphone - Get push notification while App in foreground iOS - Stack Ove...

iphone ios objective-c push-notification
Rectangle 27 433

compile 'com.android.support:design:25.0.1'
CoordinatorLayout
  • Add layout_anchorto the FAB and set it to the top view
layout_anchorGravity
bottom|right|end
<android.support.design.widget.CoordinatorLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">

        <LinearLayout
            android:id="@+id/viewA"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_weight="0.6"
            android:background="@android:color/holo_purple"
            android:orientation="horizontal"/>

        <LinearLayout
            android:id="@+id/viewB"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_weight="0.4"
            android:background="@android:color/holo_orange_light"
            android:orientation="horizontal"/>

    </LinearLayout>

    <android.support.design.widget.FloatingActionButton
        android:id="@+id/fab"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="16dp"
        android:clickable="true"
        android:src="@drawable/ic_done"
        app:layout_anchor="@id/viewA"
        app:layout_anchorGravity="bottom|right|end"/>

</android.support.design.widget.CoordinatorLayout>

@Aprendiz I would also like a citation but I can see why this a better answer than HughJeffner's. I find it simpler, more flexible, less hackish. You don't hardcode any layout_height or margin values, which could vary in time or be defined dynamically. Hugh's answer could work in some simple cases, and perhaps could be a workaround for some third-party libraries that don't fully support CoordinatorLayout and layout_anchor and layout_anchorGravity features, like the one he's using, futuresimples.

Btw futuresimples is an AWESOME library, and in case someone is wondering there is a fork that combine this CoordinatorLayout approach with that library, look. And there's also a fork for older versions.

Why isnt all this in Androids documentation?

using app:layout_anchor causing me a rendering problem (linearlayout layoutparams cannot be cast to coordinatorlayout. :(

android - How can I add the new "Floating Action Button" between two w...

android android-coordinatorlayout floating-action-button
Rectangle 27 1

Used in conjunction with a custom action, this indicates that the action should not be available as an accessory button when the input method is full-screen. Note that by setting this flag, there can be cases where the action is simply never available to the user. Setting this generally means that you think showing text being edited is more important than the action you have supplied. Corresponds to IME_FLAG_NO_ACCESSORY_ACTION.

Thanks for answer. i have tested this but according to my functionality Next button should be there .after using this nothing is there only text,.

By having the button there I think you can't stop copy paste, as it is replaced by those functionalities as soon as you select text..

This is default behavior of jelly bean .we want next button but do not want this Next button change to Edit after select the text.

android - How to avoid cut/copy/paste in smart phone after rotation po...

android android-edittext smartphone android-4.2-jelly-bean
Rectangle 27 1

Used in conjunction with a custom action, this indicates that the action should not be available as an accessory button when the input method is full-screen. Note that by setting this flag, there can be cases where the action is simply never available to the user. Setting this generally means that you think showing text being edited is more important than the action you have supplied. Corresponds to IME_FLAG_NO_ACCESSORY_ACTION.

Thanks for answer. i have tested this but according to my functionality Next button should be there .after using this nothing is there only text,.

By having the button there I think you can't stop copy paste, as it is replaced by those functionalities as soon as you select text..

This is default behavior of jelly bean .we want next button but do not want this Next button change to Edit after select the text.

android - How to avoid cut/copy/paste in smart phone after rotation po...

android android-edittext smartphone android-4.2-jelly-bean
Rectangle 27 9

Correction as Sudhan points out:

UIUserNotificationAction
UIUserNotificationCategory
activationMode
UIUserNotificationActivationModeForeground
yourNotifificationAction.activationMode=UIUserNotificationActivationModeForeground

When the user presses the action button, app will launch in foreground and call this method on the appDelegate:

-(void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forRemoteNotification:(NSDictionary *)userInfo completionHandler:(void (^)())completionHandler

and the above won't work as this is to open application from other application.Just try this ( [action1 setActivationMode:UIUserNotificationActivationModeForeground]; ), i think you used up Activation Mode Background @Hiroto

How to open iOS app when Push Notification custom button clicked? - St...

ios push-notification
Rectangle 27 54

angular.module('yourModuleName').service('modalService', ['$modal',
// NB: For Angular-bootstrap 0.14.0 or later, use $uibModal above instead of $modal
function ($modal) {

    var modalDefaults = {
        backdrop: true,
        keyboard: true,
        modalFade: true,
        templateUrl: '/app/partials/modal.html'
    };

    var modalOptions = {
        closeButtonText: 'Close',
        actionButtonText: 'OK',
        headerText: 'Proceed?',
        bodyText: 'Perform this action?'
    };

    this.showModal = function (customModalDefaults, customModalOptions) {
        if (!customModalDefaults) customModalDefaults = {};
        customModalDefaults.backdrop = 'static';
        return this.show(customModalDefaults, customModalOptions);
    };

    this.show = function (customModalDefaults, customModalOptions) {
        //Create temp objects to work with since we're in a singleton service
        var tempModalDefaults = {};
        var tempModalOptions = {};

        //Map angular-ui modal custom defaults to modal defaults defined in service
        angular.extend(tempModalDefaults, modalDefaults, customModalDefaults);

        //Map modal.html $scope custom properties to defaults defined in service
        angular.extend(tempModalOptions, modalOptions, customModalOptions);

        if (!tempModalDefaults.controller) {
            tempModalDefaults.controller = function ($scope, $modalInstance) {
                $scope.modalOptions = tempModalOptions;
                $scope.modalOptions.ok = function (result) {
                    $modalInstance.close(result);
                };
                $scope.modalOptions.close = function (result) {
                    $modalInstance.dismiss('cancel');
                };
            };
        }

        return $modal.open(tempModalDefaults).result;
    };

}]);
<div class="modal-header">
  <h3>{{modalOptions.headerText}}</h3>
</div>
<div class="modal-body">
  <p>{{modalOptions.bodyText}}</p>
</div>
<div class="modal-footer">
  <button type="button" class="btn" 
          data-ng-click="modalOptions.close()">{{modalOptions.closeButtonText}}</button>
  <button class="btn btn-primary" 
          data-ng-click="modalOptions.ok();">{{modalOptions.actionButtonText}}</button>
</div>

once this is done... you just have to inject above service whereever you want to create a dialog box, example below

$scope.deleteCustomer = function () {

    var custName = $scope.customer.firstName + ' ' + $scope.customer.lastName;


    var modalOptions = {
        closeButtonText: 'Cancel',
        actionButtonText: 'Delete Customer',
        headerText: 'Delete ' + custName + '?',
        bodyText: 'Are you sure you want to delete this customer?'
    };

    modalService.showModal({}, modalOptions)
        .then(function (result) {
             //your-custom-logic
        });
}

This looks like an elegant way of using dialogs globally. Will wait for other answers before accepting your answer by the time I give a go for this. Thanks!

I am using this approach in my application at the moment. Also, appreciate the link for Dan Wahlin's blog post. Marking your suggestion as the answer.

How can you close this modal from code? I mean automatically when some proccess finished. Trigger on close button doesn't work. Any idea?

To be able to use this modal, one has to do the following: 1. Load ui-bootstrap-0.14.3.js (or the appropriate file version) in index.html 2. Declare ui.bootstrap as a dependency for the app, like so: angular.module('testApp', ['ui.bootstrap']);. If including latest version, in the above code for the Modal Service, replace $modal with $uibModal and replace $modalInstance with $uibModalInstance.

angularjs - Create a simple Bootstrap Yes/No confirmation or just noti...

angularjs angular-ui-bootstrap bootstrap-modal