Ruben Silva
Ruben Silva

Reputation: 17

Change interpolation brackets - Angular2

I want to use Laravel Blade and AngularJS.

Is some way to change interpolate sintax, change {{text}} for [{text}] or somthing like that?

I already change all components.ts files adding the line: interpolation: ["{[", "]}"], but, where I write blade, app breaks...

Thanks a lot everybody ;)

Upvotes: 1

Views: 329

Answers (1)

Adnan A.
Adnan A.

Reputation: 1982

You can define your Blade content tags in your routes.php file:

Blade::setContentTags('<%', '%>');
Blade::setEscapedContentTags('<%%', '%%>');

EDIT: You can add @ in front of the brackets, so Blade won't render it.

@{ var }

or you can pass the directive for blade not to render part of the HTML using @verbatim keyword.

@verbatim
<div>
    {{ var }}
</div>
@endverbatim

Upvotes: 1

Related Questions