nohros / nsPopover

Popover dialogs for angularjs applications.
MIT License
126 stars 107 forks source link

Used isolated scope. #123

Closed jeevasusej closed 7 years ago

jeevasusej commented 7 years ago

Used isolated scope. https://github.com/jeevasusej/nsPopover popOverData - used to pass data for the template. callBackEventsIndex - identify callback events in ng-repeat callBackEvents - could be array of event or single event nsPopoverCommonObject - the common functions and the data that should be used in the template.

Should be used like The following is the necessary one where the data will be used in the template. pop-over-data="data" call-back-events="eventObject" - This is where the event should be called from the controller call-back-events-index ="$index" - This will be used in the ng-repeat functionality. That is the above object will be act as array. If this attribute is not mentioned, then the above object will act as object instead of array. ns-popover-trigger-programmatically - This is to enable the trigger event from the controller.

To open the popover from the controller, use like following,

call-back-events="eventObject" -- if the above is the object then call like eventObject.openPopover(event); -- If the above is the array then call like eventObject[index].openPopover(event);

nohros commented 7 years ago

@jeevasusej Can you submit your code using 2 spaces instead of 4. Thanks