scalyr / angular Goto Github PK
View Code? Open in Web Editor NEWCode to optimize AngularJS for complex pages
License: MIT License
Code to optimize AngularJS for complex pages
License: MIT License
I fixed this issue by adding before this line
https://github.com/scalyr/angular/blob/master/src/js/directives/slyRepeat.js#L110
newElement.scope.$even = i % 2 === 0;
newElement.scope.$odd = i % 2 === 1;
I have a grid with dynamic columns that uses sly-repeat to repeat the items. I have the attribute directive slyEvaluateOnlyWhen pointing to the array of columns, and everytime we add/remove a column, it updates properly.
The problem comes when I want to add/delete items to this grid. If I delete the initial items, it's ok, but if I add items and then I delete them, the sly-repeat just empty the object of that item, but not delete it from the grid items array.
How can I force to update the repeat?
It works well on Chrome and firefox, but not in IE. It just doesn't work. Are you gonna fix it? It would be absolutely awesome!
Hello,
It seems sly-show activated with sly-prevent-evaluation-when-hidden are not working correctly anymore on 1.3.0 rc4.
Could you check it ?
Parameters of function $new were changed. Usage scalyr with angular 1.4 produces errors.
$new: function(isolate, parent)
https://github.com/angular/bower-angular/blob/master/angular.js#L13834
Allow use of repeat start/end points
Hello, is there any possibility to add maps support as follow
sly-repeat="(key, product) in products"
Best regards,
Adam
Could you please add your package to bower?
I cannot get ng-include to work properly inside sly-repeat.
Example: http://plnkr.co/edit/rupz8X6NNEEkXk3EEj0N
I have a 14k array, and bad perfomance with angular 1.6.4, but this method has 2x slower page rendereing time.
<md-card ng-repeat="photo in photos" ng-show="infiniteIndex>$index" class="flex-item">
VS
<md-card sly-repeat="photo in photos" sly-show="infiniteIndex>$index" sly-prevent-evaluation-when-hidden class="flex-item">
Hi there,
can you please tag the latest commit with "1.0.1" so the tool bower recognizes the new version when somebody uses this github repository as source for sly in bower?
First thanks for your nice work.
When using scalyr/angular in mocha, mocha reports global leak detected: scopePrototype
And indeed, l. 722, scalyr/angular is leaking a global variable "scopePrototype"
Could this be fixed ? I think a simple var
would do it but I'm not 100% sure since we're dealing with complex Angular code.
Angular 1.2.11 (same problem with older versions)
Angular UI Bootstrap 0.10.0 (same problem with older versions)
If you are using scalyr and angular ui tooltips you won't see a tooltip anymore if you have a tooltip-delay of 0. The tooltip should actually be shown, but it is not interpolated in the digest cycle. If you trigger another digest cycle while hovering over an element with a tooltip, the tooltip will be rendered, but has the wrong position.
As a workaround to render the tooltips you can set the tooltip-delay to 1ms or create an additional directive for the attribute tootltip and create an eventlistener on mouseenter to trigger the digest cycle, but this does not solve the problem with the wrong positioning.
Link to blog in readme.md points to https://scalyr.com/2013/10/31/angularjs-1200ms-to-35ms/ which redirects to homepage.
It should be probably changed to https://www.scalyr.com/blog/angularjs-1200ms-to-35ms.
Don't want to make PR since this file is built by script (?) and real PR will take digging deeper.
Here's the patch:
--- a/scalyr.js 2016-03-16 10:40:08.035063271 +0300
+++ b/scalyr.js 2016-03-16 10:38:26.000000000 +0300
@@ -421,9 +421,9 @@
return isNull(alwaysEvaluateString) ||
!(isStringNonempty(watchExpression) && (watchExpression.indexOf(alwaysEvaluateString) >= 0));
}, true /* Evaluate any newly added watchers when they are added */);
- },
+ }
};
- },
+ }
};
}])
/**
@@ -441,7 +441,7 @@
return {
restrict: 'A',
link: function(scope, element, attrs) {
- },
+ }
};
})
/**
@@ -480,7 +480,7 @@
link: function slyShowLink(scope, element, attr) {
scope.$watch(attr.slyShow, function ngSlyShowAction(value){
$animate[toBoolean(value) ? 'removeClass' : 'addClass'](element, 'ng-hide');
- }, false, 'slyShow'); },
+ }, false, 'slyShow'); }
};
}])
/**
@@ -508,9 +508,9 @@
return false;
return true;
});
- },
+ }
};
- },
+ }
};
});
@@ -617,7 +617,7 @@
// Need to add in an element for each new item in the collection.
var newElement = {
scope: $scope.$new(),
- isActiveForRepeat: true,
+ isActiveForRepeat: true
};
gateWatchersForScope(newElement);
hi
i need send parameters to $location.search() like bellow
key='data';
params_get_from_url = $location.search().key;
should change key dynamically change $location.search results but not work...
please help me.
Using Angular 1.2.1 I get the following error:
ReferenceError: equals is not defined
at Scope.gatedScopeDigest [as $digestGated] (http://localhost:7778/bower_components/angular-scalyr-optimization/scalyr.js:787:25)
at Object.<anonymous> (http://localhost:7778/bower_components/angular-scalyr-optimization/scalyr.js:887:20)
at Scope.$get.Scope.$digest [as $originalDigest] (http://localhost:7778/bower_components/angular/angular.js:11436:47)
at Scope.$rootScope.$digest (http://localhost:7778/scripts/app.js:586:15)
at Scope.$get.Scope.$apply (http://localhost:7778/bower_components/angular/angular.js:11682:24)
at HTMLButtonElement.<anonymous> (http://localhost:7778/bower_components/angular/angular.js:17531:21)
at HTMLButtonElement.b.event.dispatch (http://localhost:7778/bower_components/jquery/jquery.min.js:3:28337)
at HTMLButtonElement.b.event.add.v.handle (http://localhost:7778/bower_components/jquery/jquery.min.js:3:25042) angular.js:9101
Maybe angular.equals or areEqual in line 175 was meant?
Search for 'lhs' and you'll see we reference it as a variable but never define it.
Hello There:
First of all thank you for sharing your directives, that is very exciting stuff as my project needs some serious optimizations and Scalyr seems very promising. Though upon integration I am running through some issues such as:
ReferenceError: lhs is not defined
at compile (http://127.0.0.1:9000/scalyr.js:579:15)
at invokeLinkFn (http://127.0.0.1:9000/lib/angular/angular.js:8642:9)
at nodeLinkFn (http://127.0.0.1:9000/lib/angular/angular.js:8142:11)
at compositeLinkFn (http://127.0.0.1:9000/lib/angular/angular.js:7534:13)
at nodeLinkFn (http://127.0.0.1:9000/lib/angular/angular.js:8137:24)
at compositeLinkFn (http://127.0.0.1:9000/lib/angular/angular.js:7534:13)
at publicLinkFn (http://127.0.0.1:9000/lib/angular/angular.js:7409:30)
at compile (http://127.0.0.1:9000/lib/angular-ui-router/release/angular-ui-router.js:4026:9)
at invokeLinkFn (http://127.0.0.1:9000/lib/angular/angular.js:8642:9)
at nodeLinkFn (http://127.0.0.1:9000/lib/angular/angular.js:8142:11) <!-- slyRepeat: (groupName, groupData) in editSelection -->
I have added the script to the root folder as well as the folders that it came with and added 'sly' to my module dependencies, but is there anything else I am supposed to pass as a dependency to get the lhs error to disappear?
Thank you for the help and sorry for the burden.
Why is there a creation of many workers with AngularJS? Could it be memory-hungry and causing loss of performance with long lists?
Thanks
nice lib, working perfect when i push items to array, but when unshift it's working incorrectly
it is necessary to reevaluate all other items
maybe u have thoughts how to do it?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.