Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
618 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 Reply

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...