I am trying to improve the performance of my ng-repeat's. I have upgraded my project to use library v1.3.0 (main lib and route).
I am trying to use the bind once as here: Do bindings nested inside of a lazy one-time ng-repeat binding bind just once?
However, when i add :: to my ng-repeat, the list is not populated:
<li ng-repeat="info in Profile.ChangeInfo">
<p> {[{info.Message}]} </p>
</li>
The above works.
The below fails:
<li ng-repeat="info in ::Profile.ChangeInfo">
<p> {[{::info.Message}]} </p>
</li>
Error i see is:
Error: [$parse:syntax] http://errors.angularjs.org/1.3.0-beta.9/$parse/syntax?p0=%3A&p1=not%20a%20primary%20expression&p2=1&p3=%3A%3AProfile.ChangeInfo&p4=%3A%3AProfile.ChangeInfo
UPDATE
Upgraded to beta 16, and now seeing this error in IE8:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; MS-RTC LM 8; InfoPath.3)
Timestamp: Fri, 15 Aug 2014 12:01:03 UTC
Message: [$injector:modulerr] Failed to instantiate module ng due to:
Object doesn't support this property or method
http://errors.angularjs.org/1.3.0-beta.16/$injector/modulerr?p0=ng&p1=Object%20doesn't%20support%20this%20property%20or%20method
Line: 3982
Char: 7
Code: 0
URI: http://local host:1010/js/vendor/angular.js
The bindonce syntax :: has been introduced since angularjs version 1.3.0-beta.16
You have to upgrade angularjs to version 1.3.0-beta.16 or newer.
please see here sample demo http://jsbin.com/wimon/2/edit
Use the latest angularjs beta
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.18/angular.min.js"></script>
Remove square bracket
<li ng-repeat="info in ::Profile.ChangeInfo">
<p> {{::info.Message}} </p>
</li>
Related
I have some users not being able to access some templates on my angularjs application when my server responds with status code 304. Angularjs is logging [$compile:tpload] as you can see bellow and the views are not being shown to the users. So somehow angular is not getting the views from cache. The issue seems to happen very intermittently and the page starts work properly again after a clean browser cache + page refresh.
I'm running Angularjs v1.6.6 with ui-router v0.3.2 and I'm hosting my static files on firebase hosting. Is it something that was fixed on latest versions? Otherwise, how should I handle this case?
[$compile:tpload]
http://errors.angularjs.org/1.6.6/$compile/tpload?p0=%2Fjs%2Ftemplate1%template1.html&p1=304
Possibly unhandled rejection:
{"data":"","status":304,"config":{"method":"GET","transformRequest":[null],"transformResponse":[null],"jsonpCallbackParam":"callback","cache":{},"headers":{"Accept":"text/html"},"url":"/p/p.html"},"statusText":"","xhrStatus":"complete"}
Caught Request/Response using LogRocket
URL: "https://url.com/js/p/a/template.html"
method: "GET"
status: 304
duration: "00:00.061"
REQUEST
headers
Accept: "application/json, text/plain, */*"
body: null
credentials: ""
mode: ""
referrer: ""
RESPONSE
headers
cache-control: "max-age=3600"
date: "Sat, 15 Sep 2018 20:03:12 GMT"
etag: ""f166a7577a895x3f7dcc5accae97dcba""
expires: "Sat, 15 Sep 2018 17:45:33 GMT"
vary: "Accept-Encoding"
via: "1.1 varnish"
x-cache: "HIT"
x-cache-hits: "1"
x-served-by: "cache-bma1622-BMA"
x-timer: "S1537041792.121483,VS0,VE1"
body: ""
I recently faced the same issue.
After some digging, I finally found the root cause is the modification date of template HTML files are too old. I found that if your template files modified earlier than 1997-0726 05:00, the issue would happen.
Note that my testing web server islighttpd, other webservers may have a similar issue but the date may vary.
For example, you can execute the following command to reproduce this issue or fix the issue, where the *.html file are angular template files.
Reproduced issue.
date -s "199707260500" && touch login.html; touch status.html
Fix the issue.
date -s "199707260501" && touch login.html; touch status.html
You could try to add this to your app.config function.
app.config(['$qProvider', function ($qProvider) {
$qProvider.errorOnUnhandledRejections(false);
}]);
In other cases of people that saw this "error", they had fix it using that code as workaround.
I am trying to access a web page from CodeNameOne application. Strangely the simulator is throwing errors whereas the application is working fine in andriod mobile.
Code Snippet:
Form loginForm = new Form("LoginNew"); loginForm.setLayout(new
BorderLayout()); WebBrowser browser = new WebBrowser()
browser.setURL("http://mobile.apps-tek.com:8081/apps-webservices");
loginForm.addComponent(BorderLayout.CENTER,browser); loginForm.show();
Error while running in simulator.
Attribute 'xmlns' is not supported for tag 'html'.
The tag 'script' is not supported in XHTML-MP 1.0
The tag 'script' is not supported in XHTML-MP 1.0
Attribute 'onload' is not supported for tag 'body'.
Attribute 'name' is not supported for tag 'form'.
The tag 'script' is not supported in XHTML-MP 1.0
The tag 'script' is not supported in XHTML-MP 1.0
The tag 'script' is not supported in XHTML-MP 1.0
Attribute 'onclick' is not supported for tag 'input'.
The tag 'script' is not supported in XHTML-MP 1.0
java.lang.NullPointerException
at com.codename1.impl.javase.JavaSEPort.scale(JavaSEPort.java:3047)
at com.codename1.ui.Image.scale(Image.java:930)
at com.codename1.ui.Image.scaled(Image.java:900)
at com.codename1.ui.html.ResourceThreadQueue$ResourceThread.handleImage(ResourceThreadQueue.java:562)
at com.codename1.ui.html.ResourceThreadQueue$ResourceThread.handleImage(ResourceThreadQueue.java:511)
at com.codename1.ui.html.ResourceThreadQueue$ResourceThread.access$000(ResourceThreadQueue.java:360)
at com.codename1.ui.html.ResourceThreadQueue$ResourceThread$1.run(ResourceThreadQueue.java:479)
at com.codename1.ui.Display.processSerialCalls(Display.java:1075)
at com.codename1.ui.Display.edtLoopImpl(Display.java:1019)
at com.codename1.ui.Display.mainEDTLoop(Display.java:925)
at com.codename1.ui.RunnableWrapper.run(RunnableWrapper.java:120)
at com.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:176)
[EDT] 0:0:0,0 - Exception in AppName version 1.0
[EDT] 0:0:0,1 - OS ios
[EDT] 0:0:0,1 - Error java.lang.NullPointerException
[EDT] 0:0:0,1 - Current Form null
[EDT] 0:0:0,1 - Exception: java.lang.NullPointerException - null
java.lang.NullPointerException
at com.codename1.impl.javase.JavaSEPort.scale(JavaSEPort.java:3047)
at com.codename1.ui.Image.scale(Image.java:930)
at com.codename1.ui.Image.scaled(Image.java:900)
at com.codename1.ui.html.ResourceThreadQueue$ResourceThread.handleImage(ResourceThreadQueue.java:562)
at com.codename1.ui.html.ResourceThreadQueue$ResourceThread.handleImage(ResourceThreadQueue.java:511)
at com.codename1.ui.html.ResourceThreadQueue$ResourceThread.access$000(ResourceThreadQueue.java:360)
at com.codename1.ui.html.ResourceThreadQueue$ResourceThread$1.run(ResourceThreadQueue.java:479)
at com.codename1.ui.Display.processSerialCalls(Display.java:1075)
at com.codename1.ui.Display.edtLoopImpl(Display.java:1019)
at com.codename1.ui.Display.mainEDTLoop(Display.java:925)
at com.codename1.ui.RunnableWrapper.run(RunnableWrapper.java:120)
at com.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:176)
It seems you are using Java 6 or Java 7 that is configured without Java FX support. When running without Java FX Codename One defaults to the feature phone web browser component which is pretty limited and problematic.
Make sure that the VM used to run Codename One is Java SE 7 and that the additional Java FX libraries are included there.
PrimeFaces Datatable Column Sorting is not working in IE8 but it works fine in Firefox.
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Timestamp: Thu, 17 Feb 2011 17:56:48 UTC
Message: Unexpected call to method or property access.
jquery.js.jsf
Line: 23
Char: 21078
Code: 0
URI: http://localhost:8080/PrimeFacesTutorial/javax.faces.resource/jquery/jquery.js.jsf?ln=primefaces&v=2.2.1
You might have:
<h:form id="form1">
.....
<h:form id="form2">
...
</h:form>
...
</h:form>
I got the same error, I remove the nested Form. I removed Form2 and it worked fine.
I've written a small silverlight app in vs 2008. Now I'd like to plug that app into a site that was developed using vs.net 2005. what are the steps needed to do this. This is what I've done so far.
In web.config
<compilation debug="true" strict="false" explicit="true">
<assemblies>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</assemblies>
</compilation>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI.SilverlightControls" assembly="System.Web.Silverlight, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</controls>
In the asp page.
<%# Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI" TagPrefix="asp" %>
<%# Register TagPrefix="asp" Namespace="System.Web.UI.SilverlightControls" Assembly="System.Web.Silverlight, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<body>
<form id="form1" runat="server">
<div>
Silverlight Test
<asp:ScriptManager ID="scriptManager" runat="server" />
<div style="height: 100%;">
<asp:Silverlight ID="silverlightControl" runat="server" Source="~/TypingTestV2.xap"
MinimumVersion="2.0.31005.0" Width="100%" Height="100%" />
</div>
</div>
</form>
When i run the app, i get an error in IE
Webpage error details :
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 3.5.30729; MS-RTC LM 8; .NET CLR 3.0.30729; OfficeLiveConnector.1.4; OfficeLivePatch.1.3)
Timestamp: Fri, 7 Aug 2009 13:12:30 UTC
Message: ASP.NET Ajax client-side framework failed to load.
Line: 38
Char: 34
Code: 0
URI: htt://localhost:4063/Silverlight.aspx
Message: 'Sys' is undefined
Line: 48
Char: 1
Code: 0
URI: htt://localhost:4063/Silverlight.aspx
Message: 'Sys' is undefined
Line: 57
Char: 1
Code: 0
URI: htt://localhost:4063/Silverlight.aspx
Message: 'Sys' is undefined
Line: 67
Char: 1
Code: 0
URI: htt://localhost:4063/Silverlight.aspx
and in Firefox :
ASP.NET Ajax client-side framework failed to load.
[Break on this error] if (typeof(Sys) === 'undefined') throw n...ient-side framework failed to load.');\r\n
So i'm not sure what the problem is. although it says AJAX, I'm not sure what the next step would be
(the htt above was http, but the site won't allow me to do more than one hyperlink in the post, so i changed it to htt)
hope someone is willing to help.
Shannon
Sliverlight 3 has dropped the asp silverlight server control, hence you would be better off duplicating the content of the test .htm page that VS 2008 creates. Use the <object> tag directly in your ASP.NET 2.0 app.
So I have a deployed Silverlight app that works fine on most client machines. However, I have 1 client machine (Windows Vista / IE8) that throws the following javascript error:
Webpage error details
User Agent: Mozilla/4.0 (compatible;
MSIE 8.0; Windows NT 6.0; Trident/4.0;
SLCC1; .NET CLR 2.0.50727; .NET CLR
3.5.30729; .NET CLR 3.0.30618; OfficeLiveConnector.1.3;
OfficeLivePatch.0.0) Timestamp: Tue,
21 Jul 2009 14:38:15 UTC
Message:
Sys.InvalidOperationException: Runtime
error 1001 in control 'Xaml1', method
: 1001 An error has occurred. Line:
453 Char: 17 Code: 0
URI: www.DOMAINNAME.com/ScriptResource.axd?d=DYlfEE5ljRCaoM7uReLHHn6ek5uYaOA1UhTw1oJkABzHek2FGpt_ylvF5NNjuH26VVA5njj6q3r4MlWsNnz7ag2&t=1f1ca10
This is working fine on other Vista / IE8 machines and I cannot reproduce on my dev machine.
I am assuming this is a generic error message and the real details are not being displayed. Based on the following link there is probably a way to access what is really going on, but I have no idea how.
https://silverlight.net/forums/p/99022/226122.aspx#226122
You can try to check if browser set in 'Compatible' mode. If yes, then you can try set the java script line into HEADER of your HTML/ASP page:
<head runat="server">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
</head>