Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 09 18:21
    JediSange commented #782
  • Dec 09 16:50
    JediSange commented #782
  • Dec 09 16:50
    JediSange commented #782
  • Dec 05 21:45
    saiMedavarapu commented #1997
  • Nov 07 08:26
    testacp commented #1853
  • Nov 07 08:26
    testacp commented #1853
  • Oct 30 15:24
    emanuelcoelho1986 closed #2011
  • Oct 30 10:43
    sameerpallav commented #2025
  • Oct 15 15:20
    alanhg commented #1997
  • Sep 30 15:12
    bbrink68 commented #2049
  • Aug 23 13:34
    SouravKumar89 edited #2058
  • Aug 23 13:27
    SouravKumar89 opened #2058
  • Aug 22 00:04

    PatrickJS on master

    Update README.md (compare)

  • Aug 13 17:17
    ramsunvtech commented #1925
  • Aug 12 22:58
    terrancecorley commented #770
  • Aug 09 02:30
    jindovu commented #2049
  • Aug 09 02:22
    jindovu opened #2057
  • Aug 08 10:49
    krawinkelm commented #2053
  • Jul 21 14:14
    FilipLitwora commented #958
  • Jul 21 14:14
    FilipLitwora commented #958
Blackbaud-PatrickOFriel
@Blackbaud-PatrickOFriel
Do y'all happen to know of any good examples of using Webpack in an application with Angular 1 and 2 (using ngUpdgrade)?
Jyothi lakshmi R
@Jyothi406

This error in Mozila :
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://api.uber.com/v1/products?latitude=12.9716&longtitude=77.5946. (Reason: missing token 'access-control-allow-headers' in CORS header 'Access-Control-Allow-Headers' from CORS preflight channel).

This error is in Chrom:
XMLHttpRequest cannot load https://api.uber.com/v1/products?latitude=12.9716&longtitude=77.5946. Request header field Access-Control-Allow-Origin is not allowed by Access-Control-Allow-Headers in preflight response.

i am not sure it origin mismatch or token not assigned in the header, i am not using oauth i just want to authenticate with server token provided by the uber api server.

this is my code:

client.service.ts
getEstimatesForUserLocation (lat:number,lon:number) {

let endpoint = 'https://api.uber.com/v1/products';
let url  = `${endpoint}?latitude=${lat}&longtitude=${lon}`;
let headers = new Headers();

headers.append('Authorization', 'SERVER_TOKEN');//assigning my server token to header
headers.set('Access-Control-Allow-Origin', '*');
headers.get('Access-Control-Allow-Origin');
headers.append('Access-Control-Allow-Headers','x-requested-with, Content-Type, origin, authorization, accept, client-security-token');
headers.get('Access-Control-Allow-Headers');

return this.http.get(url, {headers})
  .map(res => res.json());

}
client.component.ts

getEstimatesForUserLocation() {
this._countryService.getEstimatesForUserLocation(this.lat, this.long )
.subscribe(
data=> this.row = data,
error =>this.error = "location" + this.lat + this.long + "invalid."
);

}

can any one please tell me server token which i am assigning here is correct?
note: i am using @angular/http package

webdev48
@webdev48
I am on beta 11 using this web pack starter...everything seemed to be working until last week... I recently started getting the following on my console
'//@ sourceURL' and '//@ sourceMappingURL' are deprecated, please use '//# sourceURL=' and '//# sourceMappingURL=' instead. and a lot of them warnings whenever the application bootstraps
what should i do to avoid these warnings ( other than upgrading to latest release )
Colin Kearns
@Ckearns1210
I have got my project upgraded to RC 2 but the update must have broken something as I am now getting this error again: 90% optimize assetsError in bail mode: [default] /Users/Daily/Shortcut-Webpack/typings/browser/ambient/jquery/index.d.ts:3223:12 Subsequent variable declarations must have the same type. Variable '$' must be of type 'cssSelectorHelper', but here has type 'JQueryStatic'. and I cannot figure out how I fixed it the first time, does anyone know?
Graham Churchley
@gchurchley
I'm using Karma to test my ng2 app. How do I force Karma to acquire plugins from the local [current] folder? I am seeing this debug message: Loading plugin C:\Program Files\nodejs\node_modules/karma-requirejs. Why is it looking in the "Program Files" folder?
Graham Churchley
@gchurchley
Fixed my Karma issue with regard to global plugins. I did
npm uninstall -g karma-requirejs
So now there is no global version and Karma picks the local version in the current folder. This is NOT how I would expect it to work. Surely the local folder should take precedence.
Chris Grant
@ChrisGrant
Does anyone know how to get environment variables working in the production build? I'm running the dist folder in a heroku instance, but i need to configure the variables in it with environment variables in the different instances of the pipeline. Just wondering what strategies people have been using for this?
Pontus Enmark
@penmark
what's the "correct" way add global pipes when testing? in spec-bundle.js:setBaseTestProviders?
Vadim Fedorenko
@meiblorn

@meiblorn
Hi, guys! I need help.
I am trying to write quick start for system.js for my first open source library: http://plnkr.co/edit/oeOnHTmWasmOgRhbKkcB?p=preview.

It throws "$ is not a function" error.
I am using typings in my project but don't know how to install typings in plnkr.
Help me to fix it, please.

    (<any>$)(this._el.nativeElement).fullpage(this.options);
falconmick
@falconmick

Would just like to tell you that you guys who have made this are amazing. Theres nothing worse than jumping into a stack and going, uh.. but what do I use...

The documentation is great and it looks like it's got everything I want.

Has anyone made an in-depth guide to the entire solution? I would love a video series using this explaining all the components and how they work.

Once again. THank YOU@!!@!

Dmitry Erzunov
@derzunov_twitter
hi everybody! I try to install typings, and get error with zone.js >> typings ERR! message Attempted to compile "zone.js" as an external module, but it looks like a global module.
Help me please! What am I doing wrong? Osx, nodejs 4
falconmick
@falconmick
What exactly did you type, do you have a log?
Dmitry Erzunov
@derzunov_twitter
sudo typings install

derzunov:angular2-webpack-starter derzunov$ sudo typings install
typings ERR! message Attempted to compile "zone.js" as an external module, but it looks like a global module.

typings ERR! cwd /Users/derzunov/projects/Angular2/angular2-webpack-starter
typings ERR! system Darwin 15.4.0
typings ERR! command "/usr/local/bin/node" "/usr/local/bin/typings" "install"
typings ERR! node -v v4.4.4
typings ERR! typings -v 1.0.2

typings ERR! If you need help, you may report this error at:
typings ERR! https://github.com/typings/typings/issues

falconmick
@falconmick
Hmm.. Sorry never seen that before and I'm not on a mac/Linux. Maybe open a ticket with typings?
Di you need elevated permissions to install? Try without sudo maybe?
Do*
Dmitry Erzunov
@derzunov_twitter
Try without sudo maybe? No, it's not working) Thanks, @falconmick !
Graham Churchley
@gchurchley
I'm publishing angular2 components to the npm registry. Can anybody point me to an example of packaging using TypeScript? I'm specifically interested in how to create barrels. I have a dozen components and I want them to be packaged as three barrels.
Steve Belovarich
@steveblue
ooooo, echo that @gchurchley I want to know the best way too! you may want to ask in the angular/angular gitter
Dominic
@domfarolino
is angular2 officially switching to webpack from systemjs?
kkellystrandhill
@kkellystrandhill
Text field does not allow input in Internet Explorer 11 or Edge or Safari for Windows. Does work in Chrome and Firefox. Using Windows 10.
Benny Bottema
@bbottema
It's been a while since a release was published. does anyone have an ETA on the next stable release?
tomgirt
@tomgirt
@kkellystrandhill Similar issue. I am using Windows 10 and Edge. In the Home tab, when I click on the "Submit Local State to ..." it does not allow me to input any text. Seems to work on chrome and firefox. I looked through the known issues but cannot see a related issue. Is this an known issue. Apologies if this is already logged as an issue.
Eric Kisner
@exk0730

Hey guys, I'm having a problem importing ng2-formly stuff into the webpack starter. I think it's because it's using SystemJS to export the modules?

repo: https://github.com/formly-js/ng2-formly
npm install ng2-formly --save results in ng2-formly.js in node_modules/ng2-formly which looks like this:

System.register(["./src/main", "./src/templates"], function(exports_1, context_1) {
    "use strict";
    var __moduleName = context_1 && context_1.id;
    function exportStar_1(m) {
        var exports = {};
        for(var n in m) {
            if (n !== "default") exports[n] = m[n];
        }
        exports_1(exports);
    }
    return {
        setters:[
            function (main_1_1) {
                exportStar_1(main_1_1);
            },
            function (templates_1_1) {
                exportStar_1(templates_1_1);
            }],
        execute: function() {
        }
    }
});
I can't do import {FormlyForm} from "ng2-formly/ng2-formly";
Sam Jones
@ollwenjones
What's the best way to keep my project config up to date with a seed project such as this one? The angular 2 project is going to be inside a UI subfolder of a larger repository, so it won't be as simple as adding another remote and fetching changes and cherry picking... :( Are there any best-practices besides compare & copy+paste?
Sean Larkin
@TheLarkInn
Ncu is nice
Mathijs Segers
@msegers

@ollwenjones
What I"m currently doing is having an project which is basically a fork of webpack starter, I keep pulling in here the newest update and tweak it to use my own libraries, I then pull that into my other projects which mostly works fine.

Do have to add that I keep having to remove home, about and changes to RouteConfig. But it's trivial.

Sam Jones
@ollwenjones
Thanks @msegers . Sounds like a nice/obvious approach. Part of my challenge will be different paths from the .git folder to the package.json for instance. Teammates don't want the Angular 2 UI in it's own repo for the good reason of not having two PRs in two repos to sync for any end-to-end change. I wonder if there's some git config I don't know about that could help with the pathing, or... investigate the dreaded/controversial 'git submodule?'
raparlasiva
@raparlasiva
npm run server doesn't automatically open the webpage..had to manually type localhost:3000 in the browser to access the webpage..Was wondering why this feature was left out.....
raparlasiva
@raparlasiva
Is there a way we can include this feature in the application..
raparlasiva
@raparlasiva
Also getting this type error inside main.browser.ts ----> argument type App is not assignable to parameter type Type.
raparlasiva
@raparlasiva
i had to add <any>App inside bootstrap function for the error to go away. I am using webstorm 2016.1.2
Paul van den Berg
@bergvandenp
what do you guys use for templateurls with webpack?
Sean Larkin
@TheLarkInn
raw loader
Paul van den Berg
@bergvandenp
use template: require(bla.html) or webpack copy plugin?
Sean Larkin
@TheLarkInn
so you can do a require('./path-to-html-file.html')
yup
IMO thats the best option.
Paul van den Berg
@bergvandenp
why? so its all bundled?
Sean Larkin
@TheLarkInn
No external reqests, the templates are inlined, and it allows you to have a great Dev experience with your ng templates in a separate file in your editor so you can use things like Emmet and Syntax highlighting etc.
so
@Component({
  template: require('./foo.html')
})
Paul van den Berg
@bergvandenp
intellij loses the reference when I wrap it in a require.
do you use the same for css?
Sean Larkin
@TheLarkInn
that essentially does
@Component({
  template: `<inline-of>Your HTML file, awesome I can write it in a separate file now sweettttt.</inline-of>`
})