I am not sure if I understand your problem correctly.

Make sure you follow the code for 
if (p_IsPlunker) <<< false 
p_IsPlunker == true doesn't call web api but uses hardcoded data.
p_IsPlunker == false uses web api calls although it doesn't work on plunker

Here all data is being loaded at once if that is your question.  It is 
loaded into the primary scope and can be used by the modal in a seperate 
scope.

Once the controller loads the scope, it can be used anywhere.

See https://plnkr.co/edit/sAqHy1?p=info
Click on tabpage Entire Page & Modals Example if not already opened.
Click on link < Newest version of Template Master Example on Plunker >

Controller:
    function get_lstTemplt_Master() {
        factMainTblData.getlstTemplt_Master($scope.GlobalVars.IsPlunker, 
$scope.GlobalVars.BaseURL)
            .then(function (d) {
                $scope.AppVars.lstTemplt_Master = 
d.data.oTemplateMasterModels.templateMasterModel;
                get_lstTemplate_KindField();
            }, function (error) {
                alert('Oops! Something went wrong while fetching the data 
RetrvDataMainGrid.');
                $log.error('Oops! Something went wrong while fetching the 
data RetrvDataMainGrid.');
            });
    }

factoryMainTblData.js
    lstTemplt_Master.getlstTemplt_Master = function (p_IsPlunker, 
p_GlobalVars_BaseURL) {
    lstTemplt_Master.getlstTemplt_Kind = function (p_IsPlunker, 
p_GlobalVars_BaseURL) {


apiService.js
    this.RetrvDataMainGrid = function (p_BaseURL) {
    this.RetrvDataTemplateKind = function (p_BaseURL) {

Is this what you are asking? Do you have a plunker example?


On Saturday, June 3, 2017 at 12:57:59 AM UTC-4, Sergey Fesenko wrote:

> Angular 1.5
>
>
> I created component that by fact just form with few fields. Every field 
> looks at model through ng-model
>
> On main page user can dynamically add multiple exemplars of my component. 
>
> Is there any way to get data from all components models on page by one 
> button pressed?
>
> I tried to add callback function to this component that should return 
> component model data. 
>
> But it works only if I have one component on page. When user add few more 
> nothing returns to parent controller.
>
>
> Thanks for your replies.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to