Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*showItSizes fails when you access the app route directly from the browser #119

Open
sarahm7 opened this issue Oct 26, 2018 · 0 comments
Open

Comments

@sarahm7
Copy link

sarahm7 commented Oct 26, 2018

I tried using below example but i'm encountering an issue. For example,

My app url is http://example.com which redirects to http://example.com/home -> the directive works fine this way

but when you access http://example.com/home directly, the *showItSizes fails and hides the element from the DOM.

This only happens in production.

@Component({
     selector: 'my-component',
     template: '
        <p *showItSizes="{min:955,max:1057}">I'll show you if responsive-window width is between the min and max.</p>
        <p *showItSizes="{min:750}">I'll show you if responsive-window width is greater than or equal to min.</p>
        <p *hideItSizes="{min:360,max:768}">It is hidden if responsive-window width between the min and max.</p>
     '
})

I have the following app module setup

app.module.ts
@NgModule({
imports: [
AppRoutingModule,
BrowserModule,
BrowserAnimationsModule,
SharedModule.forRoot(),
SignalRModule.forRoot(createConfig)
],

shared.module.ts
imports : [
ResponsiveModule.forRoot()
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant