text:
Use tabs instead of buttons

@Dragnucs suggested: I think you should use tabs instead of buttons and transfer the logic into settings... Or maybe even use a side panel for quick settings like "for", "combined", "autorefresh", etc.
My reply was: Actually three buttons above AndStatus Timeline allow different combinations, it's more than one "dimension" of "tabs". BTW, I'm thinking about turning "combined/for" toggle into a three-state button +"combined for one Microblogging system"...
Q: But what does that button do already?
A: Timeline in "Combined" mode shows messages from all accounts (all Microblogging systems) as one list. It's like a "timeline aggregator". In order to see how it works, you should create more than one AndStatus account. E.g. I have "AndStatus project" account plus two separate Personal accounts in Twitter for Russian and for International audiences, but I like to see new tweets in one sequence without switching between accounts and systems...

Closing as mostly done. Now we can create more focused proposals for UI optimization...

UX improvements In upcoming v.39 of AndStatus:
Switching between accounts made more like in other Android applications, with avatars of current and two previously selected accounts in the Navigation drawer (like e.g. in GMail app).
Clicking on current account's avatar opens their "Sent" timeline with the account's profile information at the top.

repo: andstatus/andstatus


text:
blpop with a positive int timeout blocks forever

 File "/app/src/master.py", line 132, in <module>
  File "/app/src/master.py", line 64, in run
  File "/usr/lib/python2.7/site-packages/redis/client.py", line 1269, in blpop
    return self.execute_command('BLPOP', *keys)
  File "/usr/lib/python2.7/site-packages/redis/client.py", line 668, in execute_command
    return self.parse_response(connection, command_name, **options)
  File "/usr/lib/python2.7/site-packages/redis/client.py", line 680, in parse_response
    response = connection.read_response()
  File "/usr/lib/python2.7/site-packages/redis/connection.py", line 624, in read_response
    response = self._parser.read_response()
  File "/usr/lib/python2.7/site-packages/redis/connection.py", line 284, in read_response
    response = self._buffer.readline()
  File "/usr/lib/python2.7/site-packages/redis/connection.py", line 216, in readline
    self._read_from_socket()
  File "/usr/lib/python2.7/site-packages/redis/connection.py", line 174, in _read_from_socket
    data = recv(self._sock, socket_read_size)
  File "/usr/lib/python2.7/site-packages/redis/_compat.py", line 70, in recv
    return _retryable_call(sock, sock.recv, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/redis/_compat.py", line 58, in _retryable_call

How is that not expected behavior?

source: gharchive/issue

authors: Chronial gouchaoer

repo: andymccurdy/redis-py

license: MIT

license_type: permissive

license_source: github-api


text:
[Question] Occur "Segmentation fault" in a device

Hi! I tried it to my Galaxy Note 4 (Android 6.0.1) which is already rooted.
I pushed the binary which is compiled to armeabi-v7a using ndk-build into the device. But when I executed the binary in adb shell, it occurs segmentation fault.
How can I solve this problem..?
Thank you in advance!

Can you share the crash stack trace? Without it I have no obvious way to debug the issue. Also give latest master a try as I ported latest upstream.

I try the latest version and it worked Thank you very much. Just what I did, in addition, was to modify APP_PLATFORM android-28 to android-23 in Application.mk. Because my device is Android 6.0.1. Anyway, thank you for your patch.

repo: anestisb/radamsa-android

license: mit

license_source: bigquery


text:
To fix a error: children?.includes is not a function

Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch strapi-plugin-multi-tenant@1.0.4 for the project I'm working on.

Here is the diff that solved my problem:
diff --git a/node_modules/strapi-plugin-multi-tenant/server/content-types/user-group/lifecycles.js b/node_modules/strapi-plugin-multi-tenant/server/content-types/user-group/lifecycles.js
index 4a74647..af48222 100644
--- a/node_modules/strapi-plugin-multi-tenant/server/content-types/user-group/lifecycles.js
+++ b/node_modules/strapi-plugin-multi-tenant/server/content-types/user-group/lifecycles.js
@@ -4,7 +4,7 @@ module.exports = {
   beforeCreate(event) {
     const { parent, children } = event.params.data;

-    if (children?.includes(parent)) {
+    if (children?.includes && children?.includes(parent)) {
       throw new ValidationError("User group cannot be both child and parent");
     }
   },

This issue body was partially generated by patch-package.

Hey thanks for the help, this worked! The steps are pretty much very well explained in this repo, but here are the specific steps I took anyway:
In package.json I added this:
  "scripts": {
    //...
    "postinstall": "patch-package"
  },

Not sure if one or both of these needed to be ran, so I've ran both of these:
npm i patch-package
yarn add patch-package postinstall-postinstall

Then I went into node_modules/strapi-plugin-multi-tenant/server/content-types/user-group/lifecycles.js, and made the following changes inspired by this PR:
const { ValidationError } = require("@strapi/utils").errors;

module.exports = {
  beforeCreate(event) {
    const { parent, children } = event.params.data;
    if (children?.includes && children?.includes(parent)) {
      throw new ValidationError("User group cannot be both child and parent");
    }
  },
  beforeUpdate(event) {
    const { parent, children } = event.params.data;
    const { id } = event.params.where;

    if (children?.includes && children?.includes(parent)) {
      throw new ValidationError("User group cannot be both child and parent");
    }

    if (children?.includes && (children?.includes(id) || parent === id)) {
      throw new ValidationError("User group cannot be its own child or parent");
    }
  },
};

Then after this I've ran:
yarn patch-package strapi-plugin-multi-tenant

And now it works. A new patches folder got generated, which I presume will always be overriding the strapi-plugin-multi-tenant with the newly created patch.

Hello!
I'm getting another error after applying this fix. When I'm calling /api/workspaces or /api/workspaces/1 or /api/notes or /api/notes/1 with same error 500:
[2023-04-15 00:04:13.983] error: Undefined attribute level operator id
Error: Undefined attribute level operator id
    at processAttributeWhere (/Users/user/repos/project/backend/src/node_modules/@strapi/database/lib/query/helpers/where.js:86:13)
    at processWhere (/Users/user/repos/project/backend/src/node_modules/@strapi/database/lib/query/helpers/where.js:148:45)
    at /Users/user/repos/project/backend/src/node_modules/@strapi/database/lib/query/helpers/where.js:108:31
    at Array.map (<anonymous>)
    at Object.processWhere (/Users/user/repos/project/backend/src/node_modules/@strapi/database/lib/query/helpers/where.js:108:18)
    at Object.processState (/Users/user/repos/project/backend/src/node_modules/@strapi/database/lib/query/query-builder.js:317:29)
    at Object.getKnexQuery (/Users/user/repos/project/backend/src/node_modules/@strapi/database/lib/query/query-builder.js:354:12)
    at Object.execute (/Users/user/repos/project/backend/src/node_modules/@strapi/database/lib/query/query-builder.js:475:25)
    at Object.findMany (/Users/user/repos/project/backend/src/node_modules/@strapi/database/lib/entity-manager/index.js:189:70)
    at runMicrotasks (<anonymous>)

Hello,
My last error was fixed by changing schema.json from:
    "multi_tenant_user_group": {
      "type": "relation",
      "relation": "manyToOne",
      "target": "plugin::multi-tenant.user-group",
      "inversedBy": "workspaces"
    },

to:
    "userGroup": {
      "type": "relation",
      "relation": "manyToOne",
      "target": "plugin::multi-tenant.user-group",
      "inversedBy": "workspaces"
    }

authors: SVronskiy Sefibrah vitakili

repo: anetaj/strapi-plugin-multi-tenant


text:
load_imgs_from_tree doesn't raise error if wrong channel name supplied

Please refer to our FAQ and look at our known issues before opening a bug report.
Describe the bug
The load_imgs_from_tree function allows the user to specify a list of channels to load in. However, if the user specifies a channel that doesn't exist, the channel is silently skipped, rather than raising an error
To Reproduce

Provide a non-existent channel to the channels argument of the function

Expected behavior
The function should raise an error specifying the invalid channel

It also interprets the string of a single FOV name as a list to iterate through. If the user supplies the name of a single FOV, we should change it to a list of 1 item

The reason bad channels get skipped is because load_utils_from_tree relies on io_utils.list_files to get channel names, which simply ignores a substr that can't be matched with anything.
We can either add functionality in load_utils_from_tree to handle this case, or we can leave it as is and pass error handling to load_utils_from_tree. I'm leaning towards the latter because I think we have cases where we don't want list_files to throw an error if a non-existent substr is provided.

authors: alex-l-kong ngreenwald

repo: angelolab/ark-analysis


text:
Knowing if fallback

Is there a way to know which keys did the fallback on angular-translate? If you have many languages and keep developing stuff you should be able to do something like:
$rootScope.$on('$languageFallback', function(key, lang){
   console.log(key + ' in ' + lang + ' was not found. Please define it.');
});

It would help a lot while developing to know exactly which keys aren't available.

You mean at which language in the fallback stack every key at the end was "taken out"?

I think so, yes... Imagine that I've translated 100% of the english language to spanish and in the meanwhile someone adds stuff to english... I would like to know which keys got to fallback. Is it too difficult?

And maybe it should do on config something like devEnvironment(true) so it doesn't broadcast events when it's not necessary. Thank you @tspaeth for answering.

Found out how to do it by using .useMissingTranslationHandlerLog(). Haven't found it in the docs until now. Thanks!

authors: rgolea tspaeth

repo: angular-translate/angular-translate


text:
How to download and open the project

Dears I liked the project and I would like to work on it but didn't know how to open and work on the project. Thank you for any help and steps!

This section has the details you need: https://github.com/angular-ui-tree/angular-ui-tree#useful-commands
What you basically need to do:

Install Gulp and Bower on your machine
From your source directory, run bower install to install third party dependencies
Run gulp build to compile the source (this will build the files in ./dist)
Run gulp serve if you want to run the demo site locally and test your changes
(If you're running in Windows, make sure your command window runs as administrator when you run gulp serve due to some symlink issues)

Thank you for your answer.
After doing that and when I try to access to the local server with browser using: http://localhost:9000 I get nothing !

What was the output when you ran gulp serve?
This was mine (and I could use the site on port 9090):
C:\dev\angular-ui-tree>gulp serve
[20:24:55] Using gulpfile C:\dev\angular-ui-tree\gulpfile.js
[20:24:55] Starting 'serve'...
[20:24:55] Starting 'clean:examples'...
[20:24:55] Starting 'scripts:setup'...
[20:24:55] Starting 'styles'...
[20:24:56] Finished 'serve' after 774 ms
[20:24:56] Finished 'clean:examples' after 777 ms
[20:24:56] gulp-symlink:C:\dev\angular-ui-tree\source symlinked to examples/source
[20:24:56] Finished 'scripts:setup' after 784 ms
[20:24:56] Finished 'styles' after 562 ms
[20:24:56] Starting 'connect'...
[20:24:56] Finished 'connect' after 528 ms
[20:24:56] Starting 'watch'...
[20:24:57] Finished 'watch' after 85 ms
[20:24:57] Starting 'open'...
[20:24:57] Finished 'open' after 9.24 ms
[20:24:57] Server started http://localhost:9000
[20:24:57] LiveReload started on port 35729

This is the output when I run gulp serve:
Your environment has been set up for using Node.js 4.2.1 (x64) and npm.
C:\Users\Ramy-PC\AppData\Roaming\npm\angular-ui-tree-master>cd C:\Users\Ramy-PC
AppData\Roaming\npm\angular-ui-tree-master\gulpfile.js
The directory name is invalid.
C:\Users\Ramy-PC\AppData\Roaming\npm\angular-ui-tree-master>gulp serve
[07:58:07] Using gulpfile ~\AppData\Roaming\npm\angular-ui-tree-master\gulpfile.
js
[07:58:07] Starting 'serve'...
[07:58:07] Starting 'clean:examples'...
[07:58:07] Starting 'scripts:setup'...
[07:58:07] 'scripts:setup' errored after 40 ms
[07:58:07] AssertionError: missing path
at Module.require (module.js:364:3)
at require (module.js:385:17)
at requireFn (C:\Users\Ramy-PC\AppData\Roaming\npm\angular-ui-tree-master\no
de_modules\gulp-load-plugins\index.js:37:14)
at Object.defineProperty.get (C:\Users\Ramy-PC\AppData\Roaming\npm\angular-u
i-tree-master\node_modules\gulp-load-plugins\index.js:68:18)
at Gulp. (C:\Users\Ramy-PC\AppData\Roaming\npm\angular-ui-tree-ma
ster\tasks\scripts.js:7:14)
at module.exports (C:\Users\Ramy-PC\AppData\Roaming\npm\angular-ui-tree-mast
er\node_modules\gulp\node_modules\orchestrator\lib\runTask.js:34:7)
at Gulp.Orchestrator._runTask (C:\Users\Ramy-PC\AppData\Roaming\npm\angular-
ui-tree-master\node_modules\gulp\node_modules\orchestrator\index.js:273:3)
at Gulp.Orchestrator._runStep (C:\Users\Ramy-PC\AppData\Roaming\npm\angular-
ui-tree-master\node_modules\gulp\node_modules\orchestrator\index.js:214:10)
at Gulp.Orchestrator.start (C:\Users\Ramy-PC\AppData\Roaming\npm\angular-ui-
tree-master\node_modules\gulp\node_modules\orchestrator\index.js:134:8)
at Gulp. (C:\Users\Ramy-PC\AppData\Roaming\npm\angular-ui-tree-ma
ster\gulpfile.js:27:15)
[07:58:07] Finished 'serve' after 94 ms
[07:58:07] Finished 'clean:examples' after 106 ms

I think I have error that you don't have, I don't know where it come from.

I'm not really sure if this issue is caused by Windows, gulp-load-plugins or a combination of both.
This issue seems to be similar to yours, have you seen this post before? https://github.com/google/web-starter-kit/issues/655

That's an odd error and not one I'd expect to see.
I did a fresh checkout on my machine to see if I could reproduce it and didn't have any problems. Here's the commands I used:
(Lengthy output omitted, but I did receive several errors during npm install that were not fatal)
C:\t>git clone https://github.com/angular-ui-tree/angular-ui-tree.git
C:\t>cd angular-ui-tree
C:\t\angular-ui-tree>bower install
C:\t\angular-ui-tree>npm install
C:\t\angular-ui-tree>gulp build
C:\t\angular-ui-tree>gulp serve
[21:11:48] Using gulpfile C:\t\angular-ui-tree\gulpfile.js
[21:11:48] Starting 'serve'...
[21:11:48] Starting 'clean:examples'...
[21:11:49] Starting 'scripts:setup'...
[21:11:49] Starting 'styles'...
[21:11:49] Finished 'serve' after 224 ms
[21:11:49] Finished 'clean:examples' after 225 ms
[21:11:49] gulp-symlink:C:\t\angular-ui-tree\source symlinked to examples/source
[21:11:49] Finished 'scripts:setup' after 251 ms
[21:11:49] Finished 'styles' after 182 ms
[21:11:49] Starting 'connect'...
[21:11:49] Finished 'connect' after 124 ms
[21:11:49] Starting 'watch'...
[21:11:49] Finished 'watch' after 60 ms
[21:11:49] Starting 'open'...
[21:11:49] Finished 'open' after 3.93 ms
[21:11:49] Server started http://localhost:9000
[21:11:49] LiveReload started on port 35729

This is almost certainly an issue with how you've installed node.js.  I highly suggest just using nvm.

Closing this issue due to inactivity. See #815 for more information.
Please create a new issue is this still occurs with the current version of the component.

authors: Ramy-Rzem Rimiki-Romio StefanCodes Voles derek-adair jacobscarter

repo: angular-ui-tree/angular-ui-tree


text:
Getting date picker to recognize YYYYMMDD format?

We have legacy birth date data in the format of YYYYMMDD (20151022). Angular and the ui-bootstrap date picker obviously don't like this format. Also, our new UI requirements are to display the format as MMM, d YYYY (Oct, 22 2015). I'm not seeing a way to enforce a non-standard date format (for data, not for display) in the documentation. Is this not supported or am I just overlooking it?

@uberspeck, please do not use the issues forum for support related requests.  Rather, please follow the instructions here.  The issues forum is reserved for bugs.

authors: icfantv uberspeck

repo: angular-ui/bootstrap


text:
Update tab directive's select method to allow for event.stopPropagation()

The current select method on the uibTab directive does not allow the user to stop the selection process via event.stopPropagation.  We need to add an if block to check for this and not change tabs if the user's stopped the propagation.
Here's the relevant code:  https://github.com/angular-ui/bootstrap/blob/master/src/tabs/tabs.js#L161-L173
We need to update the documentation as well.
This addresses comments/concerns in #2715, #4836, and #5716.

So this turns out to be not as easy as we'd like.  From a logic flow perspective, it is not right that the select method on the NEW tab be called to determine whether or not it's ok to leave the OLD tab.
A better solution, at the expense of API bloat, would be to add a beforeChange function to the tab (that defaults to noop) that would be called before the switching of the tabs is allowed.  In that function we'd check the event.defaultPrevented property.

Currently looking at leveraging the deselect($event) method.

Using deselect($event) provides an acceptable solution.  See this plunker for the demo - the "Static title" tab is not unselectable.

The fix doesn't work for me: evt.defaultPrevented is undefined. I figured it's because I included the full jQuery library which redefines events with a isDefaultPrevented() instead of the standard defaultPrevented. I'm not sure where the fix should take place. On one hand I think it would be nice that jQuery follows standards but on the other hand I thought angular was supposed to work fine with the full jQuery library as is...

@daniel-jann, actually, you're sort of right.  Angular found this issue as well and augmented their event object with the same method from jQuery (and even included a comment as to why):
function createEventHandler(element, events) {
  var eventHandler = function(event, type) {
    // jQuery specific api
    event.isDefaultPrevented = function() {
      return event.defaultPrevented;
    };
...

I'm going to reopen and fix.

authors: daniel-jann icfantv


text:
Release state of features

According to the 3.0 milestone we are getting close! We need to be more clear about the release state of each feature, because not all of the features will be ready. My intent is that after we have had sufficient input here, we should add a bootstrap alert on the API docs and Tutorial pages for all features which are not considered "stable"
alpha - This is in development, there will almost certainly be breaking api changes, or there are major outstanding bugs.
beta - We think this is ready, but it hasn't seen a lot of use, or has some known bugs
stable - There should no longer be breaking api changes without a deprecation warning
@c0bra @PaulL1 @swalters Please edit the table below as you see fit for features you lead.

Feature
Release state

auto-resize-grid
beta

cell-navigation
stable

edit
stable

expandable
alpha

exporter
stable

grouping
beta

importer
stable

infinite-scroll
beta

move-columns
alpha

pagination
alpha

pinning
stable

resize-columns
stable

row-edit
stable

saveState
stable

selection
stable

tree-base
beta

tree-view
beta

I've updated all them @AgDude, @c0bra, @swalters, feel free to modify my first guess.

I noticed that all of them are snake-case except for saveState which is camelCase. Can we change that to be consistent?

Other than that this all looks great to me. Can we start adding the alerts?

I generated this table from the names of the feature directories/files in the repository, so the naming should be fixed there. There is inconsistency in naming conventions in the core also.

ah-ha

I'm going to go ahead and close this as this is all documented in README.md now.

repo: angular-ui/ng-grid


text:
RFC: support URL fragments in ui-sref

Proposal is to support # URL fragments/hashes in ui-sref.  So you could do:
...
It appears that $state.go(href) already supports having a hash in href, so all this would require is making a change to the ui-sref directive (make it parse the hash and then pass this to $state.go).

For anyone else struggling with this particular issue, here's how I went around it:
angular.module('app').config(['$provide', function ($provide) {

  /**
   * Extend the UI Router $stateProvider, adding the ability to specify an
   * anchor hash as a parameter in the ui-sref directive.
   */
  $provide.decorator('$state', ['$delegate', function ($stateProvider) {

    // Save the orignal function for generating a state's URL.
    var $stateHref = $stateProvider.href;

    // Create our extended function.
    $stateProvider.href = function href(stateOrName, params, options) {
      var hash = '';
      params = params || {};
      var hashParam = params['#'];

      // Check if the anchor parameter was specified.
      if (typeof hashParam !== 'undefined') {
        // Ensure hash parameter is a string and not empty.
        if ((typeof hashParam === 'string' || hashParam instanceof String) && hashParam.length) {
          hash = '#' + hashParam;
        }

        delete params['#'];
      }

      // Return the original parsed URL with the hash appended.
      return $stateHref(stateOrName, params, options) + hash;
    };

    return $stateProvider;
  }]);

}]);

$state.href is where the state identifier / params / options are parsed into a path (as best as I can tell, anyway). The code is pretty easy to read, but the workflow is pretty much:

Original function is saved, so it can be used again (not sure if there's a more OOP way to do this -- thoughts?)
Checks if there is a # parameter supplied. If so, save its value, then remove it from the params object.
Generate the path using the original function.
Return the generated path with the anchor appended.

This is used by simply specifying a # parameter as part of your ui-sref directive:

@cryode HTML5 user here. Looks great and technically works—in that the href tag gets filled with the proper #-having URL—but the problem is if a user clicks this link ui-router ignores the changes made and moves to the non-#-having URL anyway, essentially rendering the changes useless. I think there needs to be some deeper integration into ui-router, primarily in where it generate the string it'll replace the location bar URL with via HTML5

@mismith Thank you for the feedback with HTML5! I actually realized not too long after making this post that the above really only affects the URL generated with ui-sref, and not much else (as you've unfortunately discovered).
The problem lies with how UI router generates and handles URL parameters (both URI segments and search params as a whole). The process is done in a few places, and the code to do such is duplicated, rather than performed in a central location. I haven't taken the time to confirm if that is done with good reason, or is simply an oversight. Either way, the solution was far beyond implementation in the application level, and more than likely will need to be done on UI Router's end.
I will try to reply with the specifics of where the fragment breaks down on both sides (generation and consumption), and see if I can't work with someone here (a core contributor or otherwise) to get us to a working solution.

That mirrors what I found when I looked into it myself. I'd be happy to help but ui-router is a pretty large project and I don't wanna screw anything up.
I know @nateabele offered to help coach a bit in #1455... :)

That's good news! Maybe I'll spend one of my evenings here putting together at least a recommended solution. Maybe not a full blown PR (I'll have to see what UI Router prefers re: PR format, code), but at least work with a couple of you to move this forward!

I'm digging into things a bit over at https://github.com/angular-ui/ui-router/pull/1187 too

For the purpose of supporting URL fragments as in original request:
 ...

would using ui-sref-opts work?
http://angular-ui.github.io/ui-router/site/#/api/ui.router.state.directive:ui-sref
Look up the "Parameters" table within the page.

Any news?

Its supported.  You need to download ui-router v0.2.14.
Refer to this https://github.com/angular-ui/ui-router/pull/1867.  The syntax is {'#': 'frag'}

These workarounds are hacks that really shouldn't take that many lines of code. Any chance to add the ui-sref="nav#anchor" feature? It's really one of the perks of traditional  and a major thumbs down if ui-router can't feature it...

authors: beyang cryode kikar mismith samguergen slownslower

repo: angular-ui/ui-router


text:
Preformance

Just wanted to let you know that this control is very expressive to use.
when looking at a page I made with multiple instance of this control i'm finding 69.93ms of delay for it
here is the json from the chrome angular performance output:
[{"name":"push","time":0.07799995364621275,"percent":"0.0534","$$hashKey":"EC58"},{"name":"$locationWatch","time":0.2139999996870758,"percent":"0.147","$$hashKey":"EC4S"},{"name":"autoScrollWatch","time":0.02999999560415749,"percent":"0.0206","$$hashKey":"EC66"},{"name":"ngModelWatch","time":2.736000402364877,"percent":"1.87","$$hashKey":"EC3G"},{"name":"{{$select.placeholder}}","time":2.9649988282471877,"percent":"2.03","$$hashKey":"EC3C"},{"name":"!$select.searchEnabled || ($select.selected && !$select.open)","time":1.955000800080597,"percent":"1.34","$$hashKey":"EC3O"},{"name":"$select.disabled","time":1.570999680552633,"percent":"1.08","$$hashKey":"EC3Q"},{"name":"{'focus': $select.open, 'disabled': $select.disabled, 'selectize-focus' : $select.focus}","time":3.796000732108947,"percent":"2.60","$$hashKey":"EC38"},{"name":"searchEnabled","time":0.6250001606531442,"percent":"0.428","$$hashKey":"EC4I"},{"name":"$select.selected","time":0.4409995162859557,"percent":"0.302","$$hashKey":"EC4M"},{"name":"{{$select.selected.formatted_address}}","time":0.11400011135265235,"percent":"0.0781","$$hashKey":"EC50"},{"name":"$select.searchEnabled && ($select.open || $select.isEmpty())","time":2.670000598300247,"percent":"1.83","$$hashKey":"EC3E"},{"name":"{{$group.name}}","time":2.973000053316352,"percent":"2.04","$$hashKey":"EC3A"},{"name":"$select.isGrouped","time":1.9569995347410458,"percent":"1.34","$$hashKey":"EC3K"},{"name":"{active: $select.isActive(this), disabled: $select.isDisabled(this)}","time":69.93400049395854,"percent":"47.9","$$hashKey":"EC34"},{"name":"$select.open","time":1.4579996350221345,"percent":"0.999","$$hashKey":"EC3S"},{"name":"regularInterceptedExpression","time":33.89999771025034,"percent":"23.2","$$hashKey":"EC36"},{"name":"$select.search","time":0.4369998350739482,"percent":"0.299","$$hashKey":"EC4Q"},{"name":"disabled","time":0.05099980626255268,"percent":"0.0349","$$hashKey":"EC5Y"},{"name":"{{nav.state}}","time":0.6840002606622877,"percent":"0.469","$$hashKey":"EC4G"},{"name":"{{nav.name}}","time":0.5220003658905623,"percent":"0.358","$$hashKey":"EC4K"},{"name":"{active:nav.active}","time":0.7489998824894426,"percent":"0.513","$$hashKey":"EC4E"},{"name":"business.categories[0]","time":0.1060001086443662,"percent":"0.0726","$$hashKey":"EC4W"},{"name":"business.country","time":0.050000089686363866,"percent":"0.0343","$$hashKey":"EC5S"},{"name":"function () {\n                        return element[0].getAttribute('width');\n                    }","time":0.1289999927394092,"percent":"0.0884","$$hashKey":"EC4U"},{"name":"function () {\n                        return element[0].getAttribute('height');\n                    }","time":0.04499993519857522,"percent":"0.0308","$$hashKey":"EC60"},{"name":"tiles","time":0.05799997597932815,"percent":"0.0397","$$hashKey":"EC5U"},{"name":"layers.baselayers","time":0.0639997888356447,"percent":"0.0439","$$hashKey":"EC5O"},{"name":"layers.overlays","time":0.053000112529843976,"percent":"0.0363","$$hashKey":"EC5W"},{"name":"center","time":0.0349997426383198,"percent":"0.0240","$$hashKey":"EC68"},{"name":"markers","time":0.04300003638491038,"percent":"0.0295","$$hashKey":"EC62"},{"name":"{{$select.selected.name}}","time":0.997999508399517,"percent":"0.684","$$hashKey":"EC44"},{"name":"countries.isLoading","time":0.06399984704330575,"percent":"0.0439","$$hashKey":"EC5Q"},{"name":"states.isLoading","time":0.05000026430934673,"percent":"0.0343","$$hashKey":"EC64"},{"name":"!business.categories[0]","time":0.07899990305304525,"percent":"0.0541","$$hashKey":"EC5C"},{"name":"!business.categories[1]","time":0.06499991286545984,"percent":"0.0445","$$hashKey":"EC5I"},{"name":"!business.categories[2]","time":0.06300001405179505,"percent":"0.0432","$$hashKey":"EC5G"},{"name":"{{$select.selected}}","time":0.9780000546015809,"percent":"0.670","$$hashKey":"EC48"},{"name":"paymentType.accepted","time":0.39199995808303323,"percent":"0.269","$$hashKey":"EC4O"},{"name":"/images/icons/payment_types/{{paymentType.slug}}.png","time":0.9240005747415125,"percent":"0.633","$$hashKey":"EC4A"},{"name":"{{paymentType.name}}","time":1.2609992991201568,"percent":"0.864","$$hashKey":"EC3Y"},{"name":"{{socialNetwork.name|uppercase}}","time":1.354000938590617,"percent":"0.928","$$hashKey":"EC3W"},{"name":"{{socialNetwork.name}}","time":0.8939997642301023,"percent":"0.613","$$hashKey":"EC4C"},{"name":"/images/icons/social_network/{{socialNetwork.slug}}.png","time":1.2090001255273821,"percent":"0.828","$$hashKey":"EC3U"},{"name":"{noMarginBottom:$index>=8}","time":1.5050004003569497,"percent":"1.03","$$hashKey":"EC3M"},{"name":"markers["newLocation"]","time":0.09599979966878888,"percent":"0.0658","$$hashKey":"EC4Y"},{"name":"/images/icons/pins/{{category.slug}}.png","time":1.1099997791461649,"percent":"0.761","$$hashKey":"EC42"},{"name":"{{category.name}}","time":1.893999287858601,"percent":"1.30","$$hashKey":"EC3I"},{"name":"{{category.slug}}","time":0.9029997163452212,"percent":"0.619","$$hashKey":"EC40"},{"name":"services","time":0.08100009290501473,"percent":"0.0555","$$hashKey":"EC5A"},{"name":"{active:category==selected}","time":1.1160001740790908,"percent":"0.765","$$hashKey":"EC46"},{"name":"shopping-retail","time":0.09500002488493921,"percent":"0.0651","$$hashKey":"EC54"},{"name":"hotels-travel","time":0.07299991557374602,"percent":"0.0500","$$hashKey":"EC5E"},{"name":"financial-services","time":0.06599992047995328,"percent":"0.0452","$$hashKey":"EC5K"},{"name":"beauty-spas","time":0.08200004231184715,"percent":"0.0562","$$hashKey":"EC56"},{"name":"restaurants","time":0.06099988240748644,"percent":"0.0418","$$hashKey":"EC5M"},{"name":"entertainment-activities","time":0.08600007276982073,"percent":"0.0589","$$hashKey":"EC52"}]

Closing as too full of noise and not enough useful/granular information.

authors: jacobharasimo wesleycho

repo: angular-ui/ui-select


text:
Placeholder disappear after select one tag

After select a tag the placeholder disappears, is there any way to stay placeholder after select tag. I try to change getPlaceHolder() function but it shows error like this.
Error: [$interpolate:interr] Can't interpolate: {{$selectMultiple.getPlaceholder()}}
TypeError: Cannot read property 'length' of undefined.
How i resolve this? please give suggestion for this placeholder issue.

I have the same issue

+1

authors: bostondevin gopisf pierregaste


text:
Fix for keyboard navigationwhen search-enabled is false

There are other PR with some fix for #375 but I got some problem trying to rebase, therefor I added those changes in a clean master in order to don't have problems when merged.
The PRs mentioned are #1114 and #1109

Changes to dist need to be undone. Please run git reset --hard ac0c72f && git push -f

Can you rebase once more? it should get rid of a bit of noise in the test diff.
Can you fix the white-spacing on the new ng-class attributes
(add space: ng-class="{'ui-select-search-hidden': !$select.searchEnabled}"
You need to squash, when doing so please amend the message according the the commit message style guidelines in CONTRIBUTING.md

Can the owner of this project resolve the conflicts and merge this pull request #1543 into the angular-ui-select master please?
I really need this one specific fix.

@wesleycho, @user378230 is everything ok for merging this? or do I miss or mess up something?

@fcaballero I think you merged from master rather than rebased. The only commit should be the one with your changes.
Note also 2 & 3 in my other response:

...
Can you fix the white-spacing on the new ng-class attributes (add space: ng-class="{'ui-select-search-hidden': !$select.searchEnabled}"
You need to squash, when doing so please amend the message according the the commit message style guidelines in CONTRIBUTING.md

Can yoy guys please resolve the conflicts and merge this fix in? It has been hanging out there for a while.

@ramonjsantiago want to have a go yourself? The first post has all the details you need :smile:

source: gharchive/pull-request

authors: fcaballero ramonjsantiago user378230 wesleycho


text:
Angular CLI Configuration Based Styles

Versions
6.0.3

Is it possible to include common styles when we build the app and include configuration specific styles along with it?
I have an app which uses different material themes depending on the configuration used during the build. This is how build section of app's angular.json looks like:
    "build": {
      "builder": "@angular-devkit/build-angular:browser",
        "options": {
            "outputPath": "dist/my-app",
            "index": "src/index.html",
            "main": "src/main.ts",
            "tsConfig": "src/tsconfig.app.json",
            "scripts": [ ],
            "styles": [
              // These are the common styles
              "src/styles.scss"
            ],
            "assets": [
              "src/assets",
              "src/favicon.ico"
            ]
          },
          "configurations": {
            "theme-one": {
              "styles": [
                "src/styles/themes/theme-one/material.theme.scss"
              ]
            },
            "theme-two": {
              "styles": [
                "src/styles/themes/theme-two/material.theme.scss"
              ]
            }
          }
        },

Observed behavior
Current behavior is that when I specify the configuration, the styles from that configuration are built and build:options:styles are ignored.
Desired behavior
I would like to add/build the styles specified in individual configuration along with the styles specified in build:options. For example, using the following command:
ng build --configuration theme-one
The above command should build "src/styles.scss" and "src/styles/themes/theme-one/material.theme.scss". Same for theme-two.

@faisalmuhammad
You can use this.
First specify import in styles.scss.
@import 'path/to/custom/theme-name.scss';

Create same configurations but with different fileReplacements array.
Just add JSON element to fileReplacements array, to replace one file with another.
"fileReplacements": [
    {
        "replace": "AngularApp/src/environments/environment.ts",
         "with": "AngularApp/src/environments/environment.prod.ts"
     },
     {
        "replace": "path/to/custom/theme-name.scss",
         "with": "path/to/custom/theme-one.scss"
     }
 ]

@duki994 , Unfortunately this does not solve the problem. I am looking for a solution where I can build my app with multiple configurations. This is not possible at the moment.

Heya, the feature you are requesting is partially https://github.com/angular/angular-cli/issues/11149 and partially https://github.com/angular/angular-cli/issues/10612. I'm closing this one not because it doesn't have merit, but just because there's already a conversation going on for the individual bits in those issues.

authors: duki994 faisalmuhammad filipesilva

repo: angular/angular-cli


text:
npm run build fails for angular-cli

Following: https://www.npmjs.com/package/@angular/cli#development-hints-for-working-on-angular-cli to build angular-cli.
~angular-cli [master ≡ +1 ~0 -0 !]> npm run build
> @angular/devkit-repo@0.0.0 build ~\angular-cli
> npm run admin -- build

> @angular/devkit-repo@0.0.0 admin ~\angular-cli
> node ./bin/devkit-admin "build"

Error while running script "~\angular-cli\packages\angular_devkit\core\src\json\schema\registry.ts":
TypeError: Cannot read property 'endsWith' of null
    at Function.Module._resolveFilename (~\angular-cli\lib\bootstrap-local.js:143:38)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (~\angular-cli\packages\angular_devkit\core\src\json\schema\registry.ts:10:13)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.require.extensions..ts (~\angular-cli\lib\bootstrap-local.js:93:14)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
Error while running script "~\angular-cli\packages\angular_devkit\core\src\json\schema\index.ts":
TypeError: Cannot read property 'endsWith' of null
    at Function.Module._resolveFilename (~\angular-cli\lib\bootstrap-local.js:143:38)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (~\angular-cli\packages\angular_devkit\core\src\json\schema\registry.ts:10:13)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.require.extensions..ts (~\angular-cli\lib\bootstrap-local.js:93:14)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
Error while running script "~\angular-cli\packages\angular_devkit\core\src\json\index.ts":
TypeError: Cannot read property 'endsWith' of null
    at Function.Module._resolveFilename (~\angular-cli\lib\bootstrap-local.js:143:38)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (~\angular-cli\packages\angular_devkit\core\src\json\schema\registry.ts:10:13)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.require.extensions..ts (~\angular-cli\lib\bootstrap-local.js:93:14)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
Error while running script "~\angular-cli\packages\angular_devkit\core\src\workspace\workspace.ts":
TypeError: Cannot read property 'endsWith' of null
    at Function.Module._resolveFilename (~\angular-cli\lib\bootstrap-local.js:143:38)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (~\angular-cli\packages\angular_devkit\core\src\json\schema\registry.ts:10:13)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.require.extensions..ts (~\angular-cli\lib\bootstrap-local.js:93:14)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
Error while running script "~\angular-cli\packages\angular_devkit\core\src\workspace\index.ts":
TypeError: Cannot read property 'endsWith' of null
    at Function.Module._resolveFilename (~\angular-cli\lib\bootstrap-local.js:143:38)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (~\angular-cli\packages\angular_devkit\core\src\json\schema\registry.ts:10:13)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.require.extensions..ts (~\angular-cli\lib\bootstrap-local.js:93:14)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
Error while running script "~\angular-cli\packages\angular_devkit\core\src\experimental.ts":
TypeError: Cannot read property 'endsWith' of null
    at Function.Module._resolveFilename (~\angular-cli\lib\bootstrap-local.js:143:38)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (~\angular-cli\packages\angular_devkit\core\src\json\schema\registry.ts:10:13)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.require.extensions..ts (~\angular-cli\lib\bootstrap-local.js:93:14)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
Error while running script "~\angular-cli\packages\angular_devkit\core\src\index.ts":
TypeError: Cannot read property 'endsWith' of null
    at Function.Module._resolveFilename (~\angular-cli\lib\bootstrap-local.js:143:38)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (~\angular-cli\packages\angular_devkit\core\src\json\schema\registry.ts:10:13)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.require.extensions..ts (~\angular-cli\lib\bootstrap-local.js:93:14)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
Error while running script "~\angular-cli\packages\angular_devkit\core\node\resolve.ts":
TypeError: Cannot read property 'endsWith' of null
    at Function.Module._resolveFilename (~\angular-cli\lib\bootstrap-local.js:143:38)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (~\angular-cli\packages\angular_devkit\core\src\json\schema\registry.ts:10:13)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.require.extensions..ts (~\angular-cli\lib\bootstrap-local.js:93:14)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
~\angular-cli\lib\bootstrap-local.js:97
    throw err;
    ^

TypeError: Cannot read property 'endsWith' of null
    at Function.Module._resolveFilename (~\angular-cli\lib\bootstrap-local.js:143:38)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (~\angular-cli\packages\angular_devkit\core\src\json\schema\registry.ts:10:13)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.require.extensions..ts (~\angular-cli\lib\bootstrap-local.js:93:14)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @angular/devkit-repo@0.0.0 admin: `node ./bin/devkit-admin "build"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @angular/devkit-repo@0.0.0 admin script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     ~\AppData\Roaming\npm-cache\_logs\2018-10-01T17_24_23_154Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @angular/devkit-repo@0.0.0 build: `npm run admin -- build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @angular/devkit-repo@0.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     ~\AppData\Roaming\npm-cache\_logs\2018-10-01T17_24_23_235Z-debug.log

is this related to defe0cca0685c5b0?

Closing as it doesn't follow the template.


text:
add command: ng space

🚀 Feature request
Description
Connecting to stackblitz and its deploy to space project

There is an ng deploy In pipeline. Is there any plan to add stackblitz as a provider @mgechev?

Folks can introduce a builder specific to this platform.


text:
styles that are not injected do count for initial bundle size.

🐞 Bug report
Command (mark with an x)

[ ] new
[x] build
[ ] serve
[ ] test
[ ] e2e
[ ] generate
[ ] add
[ ] update
[ ] lint
[ ] xi18n
[ ] run
[ ] config
[ ] help
[ ] version
[ ] doc

Is this a regression?
Unknown
Description
We generate different themes for our production build.
All are based on the same base styles with a different variables.scss.
We produce new files on each production build (which is handled by our ci/cd so build time is not that important).
the different styles are defined in the "styles" section of angular.json:
            "styles": [
              {
                "input": "./src/projects/contrast/styles.scss",
                "bundleName": "contrast",
                "inject": false
              },
              {
                "input": "./src/projects/projecta/styles.scss",
                "bundleName": "923a0aa8-73de-46f4-966a-26f1c39ce8e6",
                "inject": false
              },
              {
                "input": "./src/projects/projectb/styles.scss",
                "bundleName": "d945e725-7e1e-4fa5-b372-3d577b3d94cb",
                "inject": false
              },
and so on
              "src/styles.scss"
            ],
            "scripts": [
            ],

As you can see, the files are not injected.
In the production index.html I have verified that the files are not injected.
However, recently the budget exceeded for initial error caused our build to fail:
ERROR in budgets: Exceeded maximum budget for initial. Budget 5 MB was not met by 270 kB with a total of 5.26 MB.

When we removed the different themes, the error dissapeared.
When looking at the build log it looks like the size of all the additional themes are included sum of the initial bundle size and thus are the cause of exceeding the limit (but in fact they are not, which is 👍 )

🔬 Minimal Reproduction
🔥 Exception or Error

ERROR in budgets: Exceeded maximum budget for initial. Budget 5 MB was not met by 270 kB with a total of 5.26 MB.
The command '/bin/sh -c ng build --prod --source-map=false' returned a non-zero code: 1

🌍 Your Environment

Angular CLI: 9.1.4
Node: 12.13.0
OS: darwin x64

Angular: 9.1.4
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.901.4
@angular-devkit/build-angular     0.901.4
@angular-devkit/build-optimizer   0.901.4
@angular-devkit/build-webpack     0.901.4
@angular-devkit/core              9.1.4
@angular-devkit/schematics        9.1.4
@angular/cdk                      9.2.2
@ngtools/webpack                  9.1.4
@schematics/angular               9.1.4
@schematics/update                0.901.4
rxjs                              6.5.5
typescript                        3.7.5
webpack                           4.42.0

We are having the same issue which breaks our deployments.  The issue, for me, does not happen when I am on @angular-devkit/build-angular@~0.900.6.  It does present itself when I am on @angular-devkit/build-angular@~0.900.7

authors: pusherman roymilder


text:
environment variables in compiled code use different quotes than defined in environment.*.ts files

Which @angular/* package(s) are the source of the bug?
Don't known / other
Is this a regression?
No
Description
When I use single quotes, they end up being double quotes after the build

When I use single quotes, but they have double quotes inside, the correct quotes are preserved, probably due to some magic

The problem is that I'm using a placeholder as a value, which then gets replaced after the build step with a json value, but since Angular decides to use double quotes (since probably no double quotes were found in my placeholder), this results into unparseable json.
Why aren't the exact quotes preserved, could they be? Is it something configurable and I missed the option?
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in (run ng version)
Angular CLI: 13.3.1
Node: 14.17.0
Package Manager: npm 6.14.13
OS: darwin x64

Angular: 13.3.1
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1303.1
@angular-devkit/build-angular   13.3.1
@angular-devkit/core            13.3.1
@angular-devkit/schematics      13.3.1
@schematics/angular             13.3.1
rxjs                            7.4.0
typescript                      4.5.5

Anything else?
No response

This is the optimizer at work. I believe they generally choose a consistent quote to enable better compression. This is not configurable in the CLI and I don't think it should be; the optimizer is free to do such transforms and you shouldn't depend on the exact string output to achieve string replacements in a post-processing step. This can also be easily avoided by replacing the placeholder including the quotes.

Hm, I see your points, in my case I'm limited by the platform, which has replacement an a built-in option and only allow for the same start and end delimiter, so I can't use "%%, %%". I could also just escape the json value, but that in my case would be a nonsystemic solution.
I still feel like this is something that might be worth being configurable just for those environment files (if it's something even possible), since they are more likely to be used for hacky stuff post processing stuff than other places. But I'm closing this for now.
Thank you.

authors: JoostK fxck


text:
browser-esbuild: An unhandled exception occurred: EPERM: operation not permitted, copyfile

Command
build
Is this a regression?

[X] Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was
No response
Description
Hi. browser-esbuild gives up with this error:
An unhandled exception occurred: EPERM: operation not permitted, copyfile 'C:\Users\123\WebstormProjects\123\src\manifest.json' -> 'C:\Users\123\WebstormProjects\123\dist\123'
See "C:\Users\ikpoc\AppData\Local\Temp\ng-G3vwG2\angular-errors.log" for further details.

Error log is the same. Tried running with admin privileges with same result.
Minimal Reproduction
ng build
Exception or Error
No response
Your Environment
Angular CLI: 17.0.0-next.8
Node: 18.18.1
Package Manager: npm 9.8.1
OS: win32 x64

Angular: 17.0.0-next.8
... animations, cli, common, compiler, compiler-cli, core, forms
... localize, platform-browser, platform-browser-dynamic
... platform-server, router, service-worker, ssr

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1700.0-next.8
@angular-devkit/build-angular   17.0.0-next.8
@angular-devkit/core            17.0.0-next.8
@angular-devkit/schematics      17.0.0-next.8
@angular/cdk                    17.0.0-next.6
@angular/material               17.0.0-next.6
@schematics/angular             16.2.5
rxjs                            7.8.1
typescript                      5.2.2
zone.js                         0.14.0

Anything else relevant?
No response

Update: created fresh project with ng new, same error:
An unhandled exception occurred: EPERM: operation not permitted, copyfile 'C:\Users\123\WebstormProjects\test-project\src\favicon.ico' -> 'C:\Users\123\WebstormProjects\test-project\dist\test-project'


text:
Support for other service-workers

Command
serve
Description
I want to leverage todays file-watch when using ng serve. I also want to use WorkBox and not angular-serviceworker. This conflicts, for in order to compile my WorkBox template and inject built files into it it requires a second build step to be performed after angular has done emitting files to the output directory. I managed to get something like this working using a custom webpack configuration, but with angular 17 we are moving away from webpack and over to esbuild, and this customization is no longer available.
Describe the solution you'd like
In the angular.json config, a serviceWorker is either missing or declared as a pointer to an angular-serviceworker json config.
I haven't thought this fully through yet, but something like the following config would be nice:
"targets": {
  "build": {
    "options": {
      "serviceWorker": {
        "path": "./sw.ts",
        "builder": "./path/to/buildScript.js"
      }
    }
  }
}

Describe alternatives you've considered
The alternative is to give up HMR and ng serve completely, build angular first, then build and injectManifest into service worker and then run the entire project through a local http-server. This greatly reduces productivity.

Hi, this can be achieved by a custom esbuilder where you can add additional plugins and run post build tasks.

Could you please point me in the direction where how I can plug a custom esbuilder into the angular build process is documented?

As far as I understand it, the only way to add a custom esbuild plugin is through nx where they override your @angular-devkit/build-angular with their custom @nx/angular builder. Then you have access to a plugin property where you can point to an esbuild plugin.
But plugging ekstra code into the build process introduces at least two different problems:

you cannot specify an additional file to include as module in the build output. If you override the build options and include an ekstra entryPoint, this will be bundled in a way that makes it impossible to run as standalone code. You have to call an additional esbuild process to build out your service-worker template and overwrite the built code into the build process onEnd.
In the onEnd hook, the builders result.outputFiles does not include all files nescessary to inject into the workbox manifest. Only javascript chunks are present, not html, css or assets.

Code example of such a plugin is presented in the following stackoverflow issue: https://stackoverflow.com/questions/77887040/building-workbox-into-angular-using-custom-esbuilder
It would be nice if angular would consider a better support for plugins, and documentation for how a normal use-case like this could be implemented.


text:
ng generate is not respecting --dry-run flag

Bug Report or Feature Request (mark with an x)
- [x ] bug report -> please search issues before submitting
- [ ] feature request

Versions.
@angular/cli: 1.1.3
node: 7.2.1
os: win32 x64
@angular/animations: 4.2.4
@angular/common: 4.2.4
@angular/compiler: 4.2.4
@angular/core: 4.2.4
@angular/flex-layout: 2.0.0-beta.8
@angular/forms: 4.2.4
@angular/http: 4.2.4
@angular/material: 2.0.0-beta.7
@angular/platform-browser: 4.2.4
@angular/platform-browser-dynamic: 4.2.4
@angular/router: 4.2.4
@angular/cli: 1.1.3
@angular/compiler-cli: 4.2.4
@angular/language-service: 4.2.4
Repro steps.
ng new my-app -sg -sc
cd my-app\src\app
ng g m material --module=app --dry-run

The log given by the failure.
Above ng generate outputs:
installing module
You specified the dry-run flag, so no changes will be written.
  create src\app\material\material.module.ts
  update src\app\app.module.ts

Desired functionality.
ng generate with --dry-run should not create / update any files to the disk.
Above command with --dry-run updated app.module.ts with the import statement and the module added to the imports array.
import { MaterialModule } from './material/material.module';
...
  imports: [
    BrowserModule,
    MaterialModule
  ],

Mention any other details that might be useful.
Guess #921 is broken?

Thanks for the report, this sounds like a regression.
@Brocco related (and possibly duplicate) of https://github.com/angular/angular-cli/issues/6735.

He's right. I have reproduced that.
#GoodnessSquad

Fixed with Schematics.

authors: filipesilva hansl okozolin rageshvr


text:
fix(@angular/cli): fix typo in cli.ts

PR Checklist
Please check to confirm your PR fulfills the following requirements:

[ ] The commit message follows our guidelines: https://github.com/angular/angular-cli/blob/main/CONTRIBUTING.md#-commit-message-guidelines
[ ] Tests for the changes have been added (for bug fixes / features)
[ ] Docs have been added / updated (for bug fixes / features)

PR Type
What kind of change does this PR introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[x] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number: N/A
What is the new behavior?

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information
numberic -> numeric

Can you please drop that merge commit and rebase on main instead ?

Closing as this PR is stalled. If you wish to land these changes, please re-open.

authors: JeanMeche alan-agius4 eltociear


text:
Inconsistency in protractor test results

I'm seeing that running e2e tests sometimes work through successfully and sometimes not.
The phonecat app itself installed with no problem, and is running fine, as are the unit tests.
I'm thinking that my hardware isn't quite up to the task, and hope someone can confirm or weigh in.  Here's what hardware I have to work with, and its configuration:
iMac 3.2 GHz Core i3, 4GB DDR3
OSX 10.9.5
node v5.0.0
npm v3.3.6
In any case, here are the results of two separate runs, the first unsuccessful and the second successful:
Unsuccessful - though I know this is an incorrect test result since I can manually work through the scenario and confirm the test assertion:
[11:05:38] I/local - Starting selenium standalone server...
[11:05:38] I/launcher - Running 1 instances of WebDriver
[11:05:45] I/local - Selenium standalone server started at http://10.1.10.10:57860/wd/hub
Started
.F.....

Failures:
1) PhoneCat Application View: Phone list should filter the phone list as a user types into the search box
  Message:
    Expected 20 to be 1.
  Stack:
    Error: Failed expectation
        at Object.<anonymous> (/Users/ElliotFielstein/Angular/angular-phonecat/e2e-tests/scenarios.js:26:33)
        at /Users/ElliotFielstein/Angular/angular-phonecat/node_modules/jasminewd2/index.js:96:23
        at new Promise (/Users/ElliotFielstein/Angular/angular-phonecat/node_modules/selenium-webdriver/lib/promise.js:1043:7)
        at controlFlowExecute (/Users/ElliotFielstein/Angular/angular-phonecat/node_modules/jasminewd2/index.js:82:18)
        at TaskQueue.execute_ (/Users/ElliotFielstein/Angular/angular-phonecat/node_modules/selenium-webdriver/lib/promise.js:2790:14)
        at TaskQueue.executeNext_ (/Users/ElliotFielstein/Angular/angular-phonecat/node_modules/selenium-webdriver/lib/promise.js:2773:21)
        at /Users/ElliotFielstein/Angular/angular-phonecat/node_modules/selenium-webdriver/lib/promise.js:2697:25
        at /Users/ElliotFielstein/Angular/angular-phonecat/node_modules/selenium-webdriver/lib/promise.js:639:7
        at process._tickCallback (node.js:377:9)

7 specs, 1 failure
Finished in 20.503 seconds
[11:06:42] I/local - Shutting down selenium standalone server.
[11:06:42] I/launcher - 0 instance(s) of WebDriver still running
[11:06:42] I/launcher - chrome #01 failed 1 test(s)
[11:06:42] I/launcher - overall: 1 failed spec(s)
[11:06:42] E/launcher - Process exited with error code 1

Successful, which confirms the falsely unsuccessful result above:
[11:13:44] I/local - Starting selenium standalone server...
[11:13:44] I/launcher - Running 1 instances of WebDriver
[11:13:48] I/local - Selenium standalone server started at http://10.1.10.10:57775/wd/hub
Started
.......

7 specs, 0 failures
Finished in 17.252 seconds
[11:14:33] I/local - Shutting down selenium standalone server.
[11:14:33] I/launcher - 0 instance(s) of WebDriver still running
[11:14:33] I/launcher - chrome #01 passed

Anyone can confirm that hardware is the culprit, or might there be another issue here?
Thanks!

I haven't seen it, but I doubt it would be hardware-related.
I would check for outdated dependencies (e.g. remove node_modules/ and run npm install again) or an out-of-date Selenium Standalone Server. You can also bypass Selemium altogether by adding directConnect: true to your protractor config (currently in e2e-tests/protractor.conf.js).
BTW, in case you haven't noticed, the tutorial has been updated recently (yesterday), so you might be using the older version. If that is the case, I recommend starting over with the new version (including re-cloning the angular-phonecat repo (git clone --depth=16 https://github.com/angular/angular-phonecat.git) and doing a hard-refresh on https://docs.angularjs.org/tutorial to make sure you have the latest content).
--
Closing since this isn't actionable at the moment, but feel free to continue the discussion below or re-open if you find out this is soething we can fix on our side).

Thanks for the insights @gkalpak!  A few quick comments and then I'll explore your suggestions further.
As it happens, I fully installed today.  So if the update was yesterday, I think I'm covered with the latest content.  And, as mentioned, the install went without a hitch.
On the Selenium server, your suggestion to add a directConnect: true property to protractor's config sounds promising.  Makes me wonder if maybe there's a timing issue.  I'll let you know if that approach bears fruit.
Many thanks for the specific and timely response!!

@gkalpak, Unfortunately adding directConnect : true did not resolve the issue.
I should mention that I went through the entire phonecat tutorial, running unit tests and protractor test for each step.  I ran the protractor tests either adding or not adding directConnect.  The result was Intermittent failure - typically first run of a step - which then resolved to passing when the test was immediately run again.  It didn't seem to matter if directConnect was set.  I couldn't predict which run would produce the error.
He's another example of the sequence.  You see the first run caused an error - precisely the same error (at step-14) as my initial example above.  You see 'Using ChromeDriver directly...' which confirms directConnect was set:
> angular-phonecat@0.0.0 protractor /Users/ElliotFielstein/Angular/angular-phonecat
> protractor e2e-tests/protractor.conf.js

[13:25:03] I/direct - Using ChromeDriver directly...
[13:25:03] I/launcher - Running 1 instances of WebDriver
Started
.F.....

Failures:
1) PhoneCat Application View: Phone list should filter the phone list as a user types into the search box
  Message:
    Expected 20 to be 8.
  Stack:
    Error: Failed expectation
        at Object.<anonymous> (/Users/ElliotFielstein/Angular/angular-phonecat/e2e-tests/scenarios.js:30:33)
        at /Users/ElliotFielstein/Angular/angular-phonecat/node_modules/jasminewd2/index.js:96:23
        at new Promise (/Users/ElliotFielstein/Angular/angular-phonecat/node_modules/selenium-webdriver/lib/promise.js:1043:7)
        at controlFlowExecute (/Users/ElliotFielstein/Angular/angular-phonecat/node_modules/jasminewd2/index.js:82:18)
        at TaskQueue.execute_ (/Users/ElliotFielstein/Angular/angular-phonecat/node_modules/selenium-webdriver/lib/promise.js:2790:14)
        at TaskQueue.executeNext_ (/Users/ElliotFielstein/Angular/angular-phonecat/node_modules/selenium-webdriver/lib/promise.js:2773:21)
        at /Users/ElliotFielstein/Angular/angular-phonecat/node_modules/selenium-webdriver/lib/promise.js:2697:25
        at /Users/ElliotFielstein/Angular/angular-phonecat/node_modules/selenium-webdriver/lib/promise.js:639:7
        at process._tickCallback (node.js:377:9)

7 specs, 1 failure
Finished in 20.027 seconds
[13:25:47] I/launcher - 0 instance(s) of WebDriver still running
[13:25:47] I/launcher - chrome #01 failed 1 test(s)
[13:25:47] I/launcher - overall: 1 failed spec(s)
[13:25:47] E/launcher - Process exited with error code 1

Then, I simply ran protractor tests again.  Error free:
 angular-phonecat@0.0.0 protractor /Users/ElliotFielstein/Angular/angular-phonecat
> protractor e2e-tests/protractor.conf.js

[13:26:33] I/direct - Using ChromeDriver directly...
[13:26:33] I/launcher - Running 1 instances of WebDriver
Started
.......

7 specs, 0 failures
Finished in 14.125 seconds
[13:26:51] I/launcher - 0 instance(s) of WebDriver still running
[13:26:51] I/launcher - chrome #01 passed

I've run the protractor tests a few more times in the same terminal session, each time without error.  I started a new terminal session and ran the protractor tests without error.
I just can't seem to find conditions to intentionally repeat the failing test.  May be something about my system or system configuration, but I'm not sure where to look or begin exploring?

I'm out of ideas :disappointed:
(I might try modifying the test, adding a delay to see if it's a timing issue or something else (e.g. input fields are totally ignored) - although I'm not sure what I would do after that :smiley:

authors: ElliotPsyIT gkalpak

repo: angular/angular-phonecat


text:
StyleGuide - Naming

Consider clarifying what we mean by "symbol" here. Not all devs may be familiar with this term as used in this context.

I agree on this, but not sure "where" we should do it.

We can put it on the glossary and link it in the guide at least the first time.

Or in the naming overview, where we first use it.

Having a glossary definitely sounds like a good idea. Where the first usage of the term symbol is, we can refer to the glossary to keep things DRY.
// cc @johnpapa

authors: DeborahK Foxandxss mgechev


text:
ngModel.$setViewValue is throwing 'invalid argument' error in IE.

I am using angularjs version 1.3.15. I am using below code in a directive which is working fine in all the browsers except IE.
ngModel.$setViewValue("0");
above code is working fine in all the browsers. But in Internet Explorer Im getting following error.
Error: Invalid argument.
at Anonymous function (https://myApp/Scripts/App/angular.min.js:67:309)
at Anonymous function (https://myApp/Scripts/App/angular.min.js:89:324)
at Anonymous function (https://myApp/Scripts/App/angular.min.js:121:31)
at $digest (https://myApp/Scripts/App/angular.min.js:123:354)
at $apply (https://myApp/Scripts/App/angular.min.js:126:291)
at $$debounceViewValueCommit (https://myApp/Scripts/App/angular.min.js:227:362)
at $setViewValue (https://myApp/Scripts/App/angular.min.js:227:90)
at read (https://myApp/Scripts/App/app.module.js:260:33)
at Anonymous function (https://myApp/Scripts/App/app.module.js:225:25)
at dispatch (https://myApp/Scripts/App/jquery-1.9.1.min.js:22:28281)
Angular version: 1.3.15

Browser: [IE]

Can you provide a minimal reproduction (e.g. a runnable demo using CodePen, plnkr or something similar). It is hard to investigate without a concrete reproduction.

Also,  1.3.x is not supported anymore. Can you please try with 1.6.4?

I'm going to close this issue because we haven't got any feedback. Feel free to reopen this issue if you can provide new feedback.

authors: Narretz gkalpak venkikonamma458


text:
$log service, request for more methods like: group, time, profile, assert, trace and many more

I'm submitting a ...

[ ] bug report
[x] feature request
[ ] other

Current behavior:

$log service provides log, info warn error and debug methods.
Expected / new behavior:

Would it be possible to provide methods that the console provided by navigator already has?
These might include:

assert
time, timeEnd
count
group, groupEnd, groupCollapsed
profile, profileEnd
trace
dir, dirxml

Hey @Loksly
You could easily create your own wrapper for the mentioned methods, AngularJS' $log service isn't meant to be a wrapper around all of the browser's console methods.
Given the ease to integrate the methods your self and the fact that with Angular the built-in logging service has been removed, I don't think it's beneficial to add these to the core of the framework. I'd also argue it might, unnecessary, bloat the service.

I agree with @frederikprijck. Taking into account that:

few people will use these methods
it is easy to add them yourself (e.g. by decorating $log) or use console directly

...I don't think it i a good idea to add them into core.
(They can't be easily distributed as a 3rd-party package though :wink:)

authors: Loksly frederikprijck gkalpak


text:
ng-model-option for the keydown event is not working for the first key down

I'm submitting a ...

[x] bug report
[ ] feature request
[ ] other

Current behavior:

First key down value is not updated. but the second value is working properly
https://docs.angularjs.org/guide/forms#custom-model-update-triggers
Expected / new behavior:

Entered value should updated immediately after the key down event.
Minimal reproduction of the problem with instructions:

https://plnkr.co/edit/WCxpmXpDpUuV4Z396Pnp?p=preview
AngularJS version: 1.x.y

Browser: [all | Chrome XX | Firefox XX | Edge XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

all
Anything else:

You my have noticed that essentially the ngModel value is always on character behind. This happens because on keydown the value of the input is not updated yet. Thus ngModel is updated with the value that is assigned to the input before the current key was pressed.
I am going to close this issue, since ngModel/ngModelOptions work as expected here, but feel free to continue the discussion below.

OOC, why do you want to use keydown instead of the default behavior?

@gkalpak  Thanks for the clarification. the keydown events fires before the ngModel value is updated.

authors: gkalpak thirukumarangceb