by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 03 23:11

    PatrickJS on npm_and_yarn

    (compare)

  • Sep 03 23:11

    PatrickJS on master

    chore(deps-dev): bump node-sass… (compare)

  • Sep 03 23:11
    PatrickJS closed #256
  • Sep 03 23:05

    dependabot[bot] on npm_and_yarn

    chore(deps-dev): bump node-sass… (compare)

  • Sep 03 23:05
    dependabot[bot] labeled #256
  • Sep 03 23:05
    dependabot[bot] opened #256
  • Aug 01 14:37
    GRGueiros commented #254
  • Jul 21 15:15
    vanchelo commented #255
  • Jul 20 20:52
    vanchelo opened #255
  • Jul 19 11:34
    vanchelo edited #163
  • Jan 09 07:25
    nickelaos commented #253
  • Jan 09 03:36
    gauravtikekar commented #253
  • Jan 09 03:33
    gauravtikekar opened #254
  • Dec 28 2019 18:34
    nickelaos opened #253
  • Sep 25 2019 18:58

    PatrickJS on master

    Update README.md (compare)

  • Sep 24 2019 19:59
    jimzshi closed #252
  • Sep 24 2019 19:58
    jimzshi opened #252
  • Jun 26 2019 20:36
    john-dent commented #88
  • Jun 26 2019 20:35
    john-dent commented #88
  • Mar 19 2019 22:58
    gmostert closed #244
Sergey Protko
@fesor
functions and functional expressions is kind of different things
don’t overuse arrow function that much
but yes, you can define two factories in one file
and then you only need to import it correctly
Sergey Protko
@fesor
// factories.js
// this should be named objects
export function authService() {}
export function authInterceptor() {}

// module
import {authService, authInterceptor} from ‘./factories’;

// …
    .factory({authService, authInterceptor}} // enhanced  object literals
Andrew Lombardi
@kinabalu
well I was under the impression that httpInterceptors had to be factories or something
Sergey Protko
@fesor
httpfactory should be factory, yes
Andrew Lombardi
@kinabalu
is there a bad thing with arrow functions? I was just porting from some other code I saw from @brownish
Sergey Protko
@fesor
but authService… I prefer to use classes here
Andrew Lombardi
@kinabalu
ahh, I think I see
Sergey Protko
@fesor
@kinabalu I loose readability without any benifits
arrow function are very handy in case of expressions
like
Andy Brown
@brownish
arrow functions can potential mess about the scope
Sergey Protko
@fesor
$http.get(‘/something’).then(
    response => response.data,
    reason => throw new NetworkError(reason)
)
Andy Brown
@brownish
i use them for their lexical scoping
not how they look at much
Sergey Protko
@fesor
@brownish yep, this is why i think this is really helps with expressions
but for functions it just better to use functions
Andy Brown
@brownish
yeah
Sergey Protko
@fesor
wow, angular 1.5 has released
Andy Brown
@brownish
oh dang nice
Sergey Protko
@fesor
and one way bindings arrived
Andy Brown
@brownish
whaattttttt
Andrew Lombardi
@kinabalu
one way bindings?
Sergey Protko
@fesor
angular/angular.js#13928
bassicly
Andrew Lombardi
@kinabalu
@fesor i’ve been trying to use angular-base64 and I think I have the import right, and the module declaration ,but it won’t inject into my code … is it silly to use it?
Sergey Protko
@fesor
.component('myComponent', {
   bindings: {
        'oneWay': '<',
        'twoWay': '='
   },
   template: `
      <div class="my-component">
        <div class="my-component__two-way">{{$ctrl.twoWay}}</div>
        <div class="my-component__one-way">{{$ctrl.oneWay}}</div>
      </div>
   `
   controller: function () {
       this.twoWay = 'we are screwed'; // will override value
       this.oneWay = 'hell yeah!'; // will override just copy, no side effects
   }
});
Andrew Lombardi
@kinabalu

hey @fesor, when I did this:

export function loginInterceptor($q, $location) {
    "ngInject";

    let response = (response) => {
        console.log("response");
        console.log(response);
        return response;
    };
    let responseError = (response) => {
        var status = response.status;
        console.log(response.status);
        if (status == 403) {
            console.log("redirect to login screen");
            $location.path('/login');
        }
        return $q.reject(response);
    };

    return {response, responseError};
}

it complained that the Argument was not a function when I tried to add it to .factor(). but if I add default after function, it worked … is that … normal?

Andrew Lombardi
@kinabalu
how are you guys including font-awesome into your project? I’ve attempted @import ‘~font-awesome/css/font-awesome.min.css’ and then added url-loader to the webpack.config.js but it complains about the module loading
ERROR in ./~/font-awesome/fonts/fontawesome-webfont.ttf?v=4.5.0
Module parse failed: ~/client/node_modules/font-awesome/fonts/fontawesome-webfont.ttf?v=4.5.0 Line 1: Unexpected token ILLEGAL
You may need an appropriate loader to handle this file type.
(Source code omitted for this binary file)
 @ ./~/css-loader!./~/font-awesome/css/font-awesome.min.css 6:576-627
Sergey Protko
@fesor
You may need an appropriate loader to handle this file type.
there is example of how to configure url/file loaders for fonts
Andrew Lombardi
@kinabalu
that was the trick, thanks @fesor!
Andrew Lombardi
@kinabalu
what do you guys use for accessing localStorage? I’ve been using ngStorage but having some issues where it errors out with TypeError: Cannot read property 'indexOf' of undefined if I’m trying to check for the existence of a stored variable
ah nevermind, i’m silly
Andrew Lombardi
@kinabalu
@fesor i’m trying to include ng-table in my app from a previous angular project, and it seems that webpack really won’t load it. I guess it’s looking for an index.js, or several other types of files but it doesn’t exist
the last bit errors out after finding the directory but unable to do anything:
resolve directory
  directory default file index
    resolve file index in /~/client/node_modules/ng-table
      /~/client/node_modules/ng-table/index doesn't exist
      /~/client/node_modules/ng-table/index.webpack.js doesn't exist
      /~/client/node_modules/ng-table/index.web.js doesn't exist
      /~/client/node_modules/ng-table/index.js doesn't exist
      /~/client/node_modules/ng-table/index.json doesn't exist
Sergey Protko
@fesor
@kinabalu it seems to be package.json for ngTable is wrong… you can send PR to authors)
Andrew Lombardi
@kinabalu
saw your response in github just now, thanks @fesor. that’s odd indeed. wondering if it might be worth refactoring to use something like ui-grid instead
Sergey Protko
@fesor
@kinabalu by looking on github activity, ui-grid is looks a way better than ng-table
p.s. I hate grids in UI)))
Andrew Lombardi
@kinabalu
hage?
Sergey Protko
@fesor
typo, sorry
Andrew Lombardi
@kinabalu
hate?
Sergey Protko
@fesor
yep, i prefer lists, multicolumn layouts and stuff. I use grid rarelly if I don’t have any time to think about better UI
i.e. gmail-like
Andrew Lombardi
@kinabalu
what i’m attempting to represent is basically excel-like in nature, at least that’s how it’s represented now. it’s a list of accounts with financial numbers throughout
not sure how else I would really represent that