I see that you can get the index within an each helper in handlebars with
{{#each array}}
{{#index}}: {{this}}
{{/each}}
which I found in How to get index in Handlebars each helper?
This doesn't seem to work in Emblem though:
ul
each App.things
li {{#index}}
Uncaught Error: Emblem syntax error, line 1: Expected BeginStatement or DEDENT but "=" found.
=#index
Am I doing something wrong?
I had a similar problem and found the issue you opened on the emblem.js repository searching the web, the alternative syntax for #each did the trick:
ul
each App.things
li {{_view.contentIndex}}
Here is the link for people having the same issue using broccoli (and/or ember-cli) and emblem for more details: https://github.com/machty/emblem.js/issues/161#issuecomment-48853594
Hope this helps ;)
Related
I declare an SCSS variable $black in my file general.scss and in default.vue I want to use it but I have this error SassError: Undefined variable "$black".
I'm using Nuxt.js!
screenshot variable declaration
screenshot variable utilisation
screenshot organisation folder
If you have any response or help for me, thank you and sorry for my bad english :) !
[EDIT]
I don't know why but my account is blocked, so the solution of my problemes is in this tutorial
Thanks all for your times (love)
Try importing your file without using url(). Like this:
#import '#/assets/style/general.scss';
I hope that solves your issue, it worked for me.
Also, if you use those variables in a lot of different components you could consider using the #nuxtjs/style-resources module to automatically import it everywhere.
I used the Sass #use rule, because support for the #import rule will be dropped according to this timeline.
Example:
<style lang="scss">
#use '#/assets/style/general.scss';
h2 {
color: general.$black;
}
</style>
By default, the namespace is just the last component of the module’s URL.
I am facing this problem whereby I want to display pdf file on a view. The error I am currently meeting is
syntax error unexpected '?>'
Here's a bit of my code
<iframe src="{{URL::to(foldername/#../pathtofile)}} width='400' height='300' allowfullscreen="" webkitallowfullscreen=""></iframe >
You are missing a quote at the end of the src attribute and that's probably causing the error:
<iframe src="{{URL::to(foldername/#../pathtofile)}}" width='400' height='300' allowfullscreen="" webkitallowfullscreen=""></iframe >
Hope this helped you.
I found the same problem on Stackoverflow and a fix was posted: https://stackoverflow.com/a/9169401/1107123
I can make it work, but as soon I'm using it with PHP it does not.
Any ideas?
I also looked at this: https://stackoverflow.com/a/10147089/1107123
But I have no idea how to implement it. The documentation is very vague :/
This does not work: (Inside PHP)
echo "<div style="filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img.gif',sizingMethod='scale'); -ms-filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img.gif',sizingMethod="scale');'></div>";
This works just fine: (HTML)
<div style="filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img.gif',sizingMethod='scale'); -ms-filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="img.gif",sizingMethod="scale");"></div>
Original Code:
echo "<div class='sponsorImage' style='background-image:url($row[piclink]);'></div>";
How do I use the -ms-filter with this?
It's not concern of PHP/RubyRails or whatever- it all about css compatibility with browsers - Try out this one http://pastebin.com/RZ0krHj0,
Selenium Webdriver. Looking to Locate New Article from following code. Please note this is under an iframe.
<img class="rtbIcon" src="/icons/16/app/shadow/document_add.png" alt="">
<span class="rtbText">New Article</span>
I have tried to locate with xpath and many other ways. But following is what I get everytime
Code : driver.findElement(By.xpath("id('RadToolBar1'):div:div:div:ul:li[3]:a:span:span:span:span"));
Result:
The given selector id('RadToolBar1'):div:div:div:ul:li[3]:a:span:span:span:span is either invalid or does not result in a WebElement. The following error occurred:
New article has no name, id so please if some one can help find me solution.
Your xpath seems to be wrong. The best way to get the xpath for any element on a page is by installing mozilla add on - Fire Bug. You can inspect any element using this add on and also copy the correct xpath of your element present on the page.
This should be your xpath -
driver.findElement(By.xpath("//*[#class='rtbText']"));
or
driver.findElement(By.linkText("New Article"));
One of these should work. Let me know if you face any problem.
I have got following html
<a disabled="disabled"><img alt="First" src="/Content/Images/Grid/disabledFirst.png"></a>
And I run following expect on this html
expect($(element)).toBeDisabled()
where element is the selector for above html. The expect fails. Further investigation lead to following code in jasmine-jquery-1.3.1.js
toBeDisabled: function(selector){
return this.actual.is(':disabled');
},
which for some reason is returning false. I'm sure I'm missing something very basic here but just not able to spot it.
This fiddle shows that jQuery only finds inputs not anchors when using :disabled. It's understandable because the anchor element doesn't have the disabled property