Angular? throwing unexpected token because of less? - angularjs

I'm using:
JSPM, SystemJS and Angular
I can't import less files without running into a series of errors:
Error: [$parse:syntax] Syntax Error: Token 'text' is an unexpected token at column 8 of the expression [status text] starting at [text].
http://errors.angularjs.org/1.5.0/$parse/syntax?p0=text&p1=is%20an%20unexpected%20token&p2=8&p3=status%20text&p4=text
at eval (http://localhost:8002/jspm_packages/npm/angular#1.5.0/angular.js:68:12)
at Object.AST.throwError (http://localhost:8002/jspm_packages/npm/angular#1.5.0/angular.js:13816:11)
at Object.AST.ast (http://localhost:8002/jspm_packages/npm/angular#1.5.0/angular.js:13586:12)
at Object.ASTCompiler.compile (http://localhost:8002/jspm_packages/npm/angular#1.5.0/angular.js:14040:31)
at Parser.parse (http://localhost:8002/jspm_packages/npm/angular#1.5.0/angular.js:14927:29)
at $parse (http://localhost:8002/jspm_packages/npm/angular#1.5.0/angular.js:15035:39)
at $interpolate (http://localhost:8002/jspm_packages/npm/angular#1.5.0/angular.js:11770:25)
at addTextInterpolateDirective (http://localhost:8002/jspm_packages/npm/angular#1.5.0/angular.js:9282:27)
at collectDirectives (http://localhost:8002/jspm_packages/npm/angular#1.5.0/angular.js:8350:11)
at compileNodes (http://localhost:8002/jspm_packages/npm/angular#1.5.0/angular.js:8145:22) undefined
I've read a lot online and found that for some people it was the encoding of the file, but I've tried several things including the one below with no luck:
#charset "utf-8";
/* CSS Document */
Any ideas why is that happening?
Please, let me know if there are any parts of my code that could be of help.
EDIT:
Thanks!

The problem was a comment!! I have no idea why, but Angular was trying to parse the comment:
/*
---------------------------------------
A status badge.
---------------------------------------
Usage:
<span class="badge badge-status">
{{status text}}
</div>
---------------------------------------
*/
I solved it by removing the comment.

Related

My react app gives an error for some reason

Error:
src\images\navbar.js
Line 2:11: Parsing error: Unexpected token, expected "from" (2:11)
src\navbar.js
Line 2:11: Parsing error: Unexpected token, expected "from" (2:11)
the project on GitHub: https://github.com/PufflyMan/airbnb-exp-clone
It's pretty straightforward code but no matter what I tried, I couldn't fix it. Thanks for attention!
It just fixed itself. I didn't do anything

Jest-Expo ( SyntaxError: Unexpected token 'export' )

can someone help me trough this please, dont get why i get this export error? Error Message
My test file
Have you followed the instructions to set up per https://docs.expo.io/guides/testing-with-jest/ ?
This section looks most promising based on reading our error: https://docs.expo.io/guides/testing-with-jest/#jest-configuration

angular [$parse:ueoe] Unexpected end of expression

I am very new in Angular.. I tried to bind ng-init from the data that I get from ASP.NET codebehind..
The code looks like this:
<div class="ki-component" ng-app ng-init="init(<%= GetSmallCartData(3) %>)">
However I got an error "[$parse:ueoe] Unexpected end of expression". Here is more details
Error: [$parse:ueoe] Unexpected end of expression: init([{
http://errors.angularjs.org/1.6.6/$parse/ueoe?p0=init(%5B%7B
at angular.js:117
at AST.peekToken (angular.js:15278)
at AST.object (angular.js:15219)
at AST.primary (angular.js:15137)
at AST.unary (angular.js:15125)
at AST.multiplicative (angular.js:15112)
at AST.additive (angular.js:15103)
at AST.relational (angular.js:15094)
at AST.equality (angular.js:15085)
at AST.logicalAND (angular.js:15077) "<div class="ki-component ng-scope" ng-app="smallBasket" ng-controller="smallBasketCtrl" ng-init="init([{" _customermaterialnumber":null,"_internallistprizetotal":null,"_prizediscount":null,"_prizeperunit":null,"itemid":null,"mdmaterialnumber":null,"customermaterialnumber":null,"quantity":"1","quantityasked":null,"mddescription":"k="" 7="" premium="" full="" control="" plus="" home="" *eu","mdadditionaldescription":null,"freegood":null,"tdlistprice":null,"netprice":null,"grossprice":null,"requestdatebyuser":null,"deliverableonuserdate":false,"deliverydatebysystem":null,"orderitemschedules":null,"picture":"https:="" d6mbshfzr0ulu.cloudfront.net="" pro="" ad2ede993af5d4cb1dc6da428e12bcc5.jpg","mdweightunit":null,"mdformatedarticleid":"1.317-133.0","mdean":null,"mddimensions":null,"mdpackagesize":null,"mdgrossweight":null,"mdpackageunit":null,"mdpalletsize":null,"mdclassification":null,"mdgrossweightunit":null,"mddangerousgood":false,"mdcompvolume":null,"mdcompvolumeunit":null,"mdvolume":null,"mdvolumeunit":null,"tdcurrencycode":null,"tdstock":null,"tdcountryoforigin":null,"tdhazardclassification":null,"tdunit":null,"conflict":false,"conflicttest":false,"newitem":false,"matchpalletsize":true,"recommendedcountforpallet":0,"shippingpoint":null,"enablearticlenr":false,"enablecustomermatnr":false,"palletquantity":null,"palletsize":null,"palletstackfactor":null}])"="">"
Can anyone help me why I got this error and how I should fix this?
Many Thanks

Syntax error on data-target in ReactJS

I am completely new to ReactJS and I 'm working on existing app, there I found some error in the line
<span data-toggle="modal" data-target="'#'+{providers.TICKET_NUMBER}">
{providers.TICKET_NUMBER} </span>
The error displaying is "jquery-1.10.2.min.js:21 Uncaught Error: Syntax error, unrecognized expression: '#'+{providers.TICKET_NUMBER}
Kindly please help,if possible. Excuse mistakes,If any.
You need to put the expression in a pair of {}
data-target={"#" + providers.TICKET_NUMBER}>

Parse error while rendering the pdf file in angularjs app

When I try to access the pdf file which is public using the angular-pdf-viewer I got the following error message on console.
Error: [$parse:syntax] Syntax Error: Token ':' is an unexpected token at column 5 of the expression [http://pucdocket.s3.amazonaws.com/VA/PUE-2010-00039/122913.pdf] starting at [://pucdocket.s3.amazonaws.com/VA/PUE-2010-00039/122913.pdf].
here is my pdf directive for rendering the pdf file:
<pdf-viewer delegate-handle="my-pdf-container" url="http://pucdocket.s3.amazonaws.com/VA/PUE-2010-00039/122913.pdf" scale="1" show-toolbar="true" ></pdf-viewer>
could anyone help on this issue?
all the samples seems to be suggesting define url on scope and reference it. But you may try the following, which stringifys the url
<pdf-viewer delegate-handle="my-pdf-container" url="'http://pucdocket.s3.amazonaws.com/VA/PUE-2010-00039/122913.pdf'" scale="1" show-toolbar="true" ></pdf-viewer>

Resources