Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
610 views
in Technique[技术] by (71.8m points)

amp html - howcan I disable one of {{ }} commands in Laravel blade?

I create an AMP-HTML page using Laravel blade.

In sometimes, for AMP commands, I use {{ }} ... but Laravel, process it as a Laravel commands.

How can I disable only that command in that line in Laravel blade?

I know I can do it with include a pure PHP file in the PHP blade file. but can I do it directly in the blade file?

for example:

<amp-date-countdown timestamp-seconds="2147483648" layout="fixed-height" height="100">
    <template type="amp-mustache">
        {{d}} days, {{h}} hours, {{m}} minutes and {{s}} seconds until <a href="https://en.wikipedia.org/wiki/Year_2038_problem">Y2K38</a>.
    </template>
</amp-date-countdown>
question from:https://stackoverflow.com/questions/65946002/howcan-i-disable-one-of-commands-in-laravel-blade

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Have you tried putting the AMP inside an @php blade helper? In that way blade ignores everything within that tag.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...