question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DynamicPage modularity problem

See original GitHub issue

Is this a bug, enhancement, or feature request?

bug

Briefly describe your proposal.

Currently DynamicPageComponent is implemented as monoliths component without possibility to scale this into individual and smaller (reusable) fragments. Everything needs to be defined inside the content, which makes this hard to add some dynamic behavior.

When using this DynamicPage all these constructs should be possible, as with larger content you want to break it down into smaller pieces.

<fdp-dynamic-page>
    <ng-container *ngTemplateOutlet="titleTemplate">
    </ng-container>

    <ng-container *ngTemplateOutlet="content">
    </ng-container>

    <ng-container *ngTemplateOutlet="footer">
    </ng-container>
</fdp-dynamic-page>

```


````html
<fdp-dynamic-page >

    <fdp-dynamic-page-title >     
        <ng-container *ngTemplateOutlet="titleContentTemplateWithActionsAndBredCrumb">
       </ng-container>
    </fdp-dynamic-page-title>
  </fdp-dynamic-page> 
    ....

```


3. 

````html
<fdp-dynamic-page >

  <div>. <!--  wrapper element should not break the structure-->
    <fdp-dynamic-page-title >     
         ....
    </fdp-dynamic-page-title>
  <div>
  </fdp-dynamic-page> 
    ....

```


#### Which versions of Angular and Fundamental Library for Angular are affected? (If this is a feature request, use current version.)


```
Angular: 11.2.9
... animations, common, compiler, compiler-cli, core, forms
... language-service, localize, platform-browser
... platform-browser-dynamic, router
Ivy Workspace: <error>

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1102.8
@angular-devkit/build-angular   0.1102.8
@angular-devkit/core            11.2.8
@angular-devkit/schematics      11.2.8
@angular/cdk                    11.2.8
@angular/cli                    11.2.8
@angular/material               11.2.8
@schematics/angular             10.1.7
@schematics/update              0.1102.8
ng-packagr                      11.2.4
rxjs                            6.6.7
typescript                      4.1.5
    
```

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
fkolarcommented, Apr 20, 2021
  • For the second case I think I can use the same it will be verbose.
  • I just quickly tested the wrapping content with the same ngProjectAs, and it seem it works too, but more tomorrw.
Screen Shot 2021-04-20 at 10 44 53 PM Screen Shot 2021-04-20 at 10 44 35 PM

You always find some solution dont you! ? 😉

1reaction
dimamarksmancommented, Apr 20, 2021

Now you can use something like that:

<fdp-dynamic-page>
                <ng-container ngProjectAs="fdp-dynamic-page-title">
                    <ng-container *ngTemplateOutlet="pageTitleTmpl"></ng-container>
                </ng-container>
                <ng-container ngProjectAs="fdp-dynamic-page-header">
                    <ng-container *ngTemplateOutlet="pageHeaderTmpl"></ng-container>
                </ng-container>
                <ng-container ngProjectAs="fdp-dynamic-page-content">
                    <ng-container *ngTemplateOutlet="pageContentTmpl"></ng-container>
                </ng-container>
                <ng-container ngProjectAs="fdp-dynamic-page-footer">
                    <ng-container *ngTemplateOutlet="pageFooterTmpl"></ng-container>
                </ng-container>

                <!-- fdp-dynamic-page-title and fdp-dynamic-page-header rely on DynamicPageService which provided by  fdp-dynamic-page so template must be defined inside fdp-dynamic-page -->
                <ng-template #pageTitleTmpl>
                    <fdp-dynamic-page-title
                        [title]="pageTitle"
                        [subtitle]="pageSubtitle"
                    >
                        <fd-breadcrumb>...</fd-breadcrumb>
                        <fdp-dynamic-page-key-info>...</fdp-dynamic-page-key-info>
                        <fdp-dynamic-page-global-actions>...</fdp-dynamic-page-global-actions>
                        <fdp-dynamic-page-layout-actions>...</fdp-dynamic-page-layout-actions>
                    </fdp-dynamic-page-title>
                </ng-template>

                <ng-template #pageHeaderTmpl>
                    <fdp-dynamic-page-header
                        [collapsible]="true"
                        [pinnable]="true"
                        [collapsed]="false"
                        (collapseChange)="onCollapseChange($event)"
                    >
                        Page header text goes here
                    </fdp-dynamic-page-header>
                </ng-template>

                <ng-template #pageContentTmpl>
                    <fdp-dynamic-page-content>
                        Put your page conetnt here
                    </fdp-dynamic-page-content>
                </ng-template>

                <ng-template #pageFooterTmpl>
                    <fdp-dynamic-page-footer>Footer Bar</fdp-dynamic-page-footer>
                </ng-template>
</fdp-dynamic-page>
Read more comments on GitHub >

github_iconTop Results From Across the Web

Modularity. What problem does it solve? | topolog's tech blog
In this article we will discuss the problem that can be solved by modularity and how exactly modularity can make you project much...
Read more >
Distributed Systems Fundamentals [Fall 2013]
What are the benefits/problems with this architecture? + Modularity, better reliability/scalability opportunities. - Poor user latency.
Read more >
Symmetrical SyncMap for Imbalanced General Chunking ...
Summary Of The Paper: This paper aims to address the problem of learning complex structures from sequences. They improved an existing method ...
Read more >
what's wrong with this trigger? — oracle-tech
A procedure (referenced by URL via the gateway). This procedure issues DML (which causes the trigger to execute) The trigger writes some information...
Read more >
Key technologies for solving high-concurrency problems in web ...
In this case, some bottlenecks are most likely to occur in computing resources, database performance and network transmission. Ajax technology, dynamic page ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found