0

My head is aching as to what is the error in my code.

main.blade.php

Html with angular codes here.... @include('modal-template-common', ['link' => route('client.logout')]) 

modal-template-common.blade.php

{!! Html::link($link, 'OK', ('class'=>'btn btn-danger')) !!} 

Now the problems is whenever I try to render it returns an error of

ErrorException in UrlGenerator.php line 273

angular.js:11607 Error: [$compile:tpload]

any enlightenment would greatly help me.

2
  • there is a ')' missing in your include() command. Commented Apr 21, 2016 at 6:55
  • its just a typo. will edit it Commented Jun 15, 2016 at 6:54

1 Answer 1

1

I am not a fan of using Html Facade.

But isn't ('class'=>'btn btn-danger') supposed to be an array ?

So, it should be like this:

{!! Html::link($link, 'OK', array('class'=>'btn btn-danger')) !!} 

OR

{!! Html::link($link, 'OK', ['class'=>'btn btn-danger']) !!} 

The third argument is an array. You can pass any number of key => value pairs in this array to assign other related tag's attributes. In your case, the class attribute.

For more options, refer this link

Sign up to request clarification or add additional context in comments.

1 Comment

Yes, didn't notice it too. I've finally found my answer. I just used a url method and it works now. thanks!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.