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

Custom Template #38

Closed
mustafaekim opened this issue Aug 9, 2017 · 8 comments
Closed

Custom Template #38

mustafaekim opened this issue Aug 9, 2017 · 8 comments

Comments

@mustafaekim
Copy link

Hi, it works for me with the default mode. (Running with Angular Material)

However when I replace with the code below, I had some guiding without any style.

<tour-step-template>
    <ng-template let-step="step">
        <md-card (click)="$event.stopPropagation()">
            <md-card-title>
                {{step?.title}}
            </md-card-title>
            <md-card-content>
                {{step?.content}}
            </md-card-content>
            <md-card-actions>
                <button md-icon-button [disabled]="!tourService.hasPrev(step)" (click)="tourService.prev()"><md-icon>chevron_left</md-icon></button>
                <button md-icon-button [disabled]="!tourService.hasNext(step)" (click)="tourService.next()"><md-icon>chevron_right</md-icon></button>
                <button md-button (click)="tourService.end()">End</button>
            </md-card-actions>
        </md-card>
    </ng-template>
</tour-step-template>
@isaacplmann
Copy link
Owner

Let me see if I understand what you're saying. If you don't use a custom template, the tour step is styled correctly, but if you put in the custom template, no css is applied. Is that what's happening? Are you using other angular material component in your app? Are they styled correctly?

@mustafaekim
Copy link
Author

Oh, sorry for not being clear with my English. Yes, that's exactly what is happening here.

Below are the screenshots

https://ibb.co/mA5aGa
https://ibb.co/nAB49v

@mustafaekim
Copy link
Author

Let me check more deeply until tomorrow. I will let you know

@mustafaekim
Copy link
Author

OK, it worked when I added MdCardModule into imports. I didnt understand why but somehow it worked.

@isaacplmann
Copy link
Owner

Yes, that would make sense. You need to have MdCardModule and MdButtonModule available if you're going to use them in your custom template.

@isaacplmann
Copy link
Owner

Closing since you found the solution.

@kahboom
Copy link
Contributor

kahboom commented Aug 31, 2017

Had this same issue, thanks @mustafaekim ! @isaacplmann , will add that to the documentation when I get the chance, as I think it could be helpful.

@isaacplmann
Copy link
Owner

@kahboom PRs are always welcome. Thanks!

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

3 participants