Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Mike Sigsworth
    @mikesigs
    In a future update I'm sure they'll fix it. But I've found updating an already generated app to match the updates provided by an updated generator to be difficult.
    Puneet Aggarwal
    @puneetagg
    @mikesigs Ok. Thanks!!
    Maker Su
    @makersu
    hi, how to add a page after yo gulp-angular?
    example for creating a new templates and state?
    Matthieu Lux
    @Swiip
    hi, there is no generators after the first yo gulp-angular
    Maker Su
    @makersu
    update index.route.js and mkdir a folder for a new menu?
    Matthieu Lux
    @Swiip
    yep for example, you also can create a new something.route.js
    Maker Su
    @makersu
    thanks, any example used gulp-angular?
    Mike Sigsworth
    @mikesigs
    @makersu you could always girl the generator on guthub and customize it there.
    Mike Sigsworth
    @mikesigs
    Fork. Not girl.
    Forkin autocorrect...
    Nikita Buyevich
    @nikitabuyevich
    Hi, I have a question with how I can launch js files after it loads the angular views instead of before. Because I'm trying to access the DOM with javascript but it doesn't exist yet (because it runs the javascript first, before the angular views)
    Nikita Buyevich
    @nikitabuyevich

    for example if I want to get access to,

    document.querySelector('.some-class-name').clientHeight;

    I can't do that because the class hasn't been loaded yet because this script will run before the angular directive view loads.

    Mike Sigsworth
    @mikesigs
    You should read up on directives. This is more of a general angular question, and not really specific to this generator. Perhaps try Stack Overflow.
    Nikita Buyevich
    @nikitabuyevich
    Yeah I did, there's the compile command which will run the code after the directory is finished rendering but I want to try and get the DOM of the entire main.html file which doesn't use a directory, it uses stateProvider, is there a similar command but for the main.html file?
    Mike Sigsworth
    @mikesigs
    Build a directive and put it on the body beside the ng-app directive? What you're maybe trying to do sounds like an anti-pattern though.
    Nikita Buyevich
    @nikitabuyevich
    Hmm than what would be the best way to work with the DOM using the set up that this generator has? Because I'm trying to stick to that structure of having directives in the main.html and outputting the main.html in the index.html
    Nikita Skalkin
    @nickskalkin
    This message was deleted
    iamsynthetic
    @iamsynthetic
    I need help with the swiipe yeoman generator, this is probobly really dumb but how do i get my project to work online, locally it runs but as soon as i build the project is broken. The docsdont mention how to get it running outside of a local environment
    Mike Sigsworth
    @mikesigs
    The stuff you want to publish is in the dist folder. You can test to see if the dist version of your site works by running gulp serve:dist
    That will run it locally, but using the dist version.
    That's a first step.
    Once you get that part working, you can deploy the contents of the dist folder to another environment.
    iamsynthetic
    @iamsynthetic
    Hey thanks for the response. I figured it out partially, i changed the baedir variable in the server gulp file before uploading. However i can't seem to get my files to work in a subdirectory ie mysite.com/subdirectory the whole rhing breaks any ideas on that? Thanks again.
    Mike Sigsworth
    @mikesigs
    Try adding a <base> tag to your index.html.
    <html>
    <head>
        <base href="/subdirectory/">
    </head>
    </body>
    This you're either going to have to do manually when you deploy, or figure out some dynamic way to do it. Hell there's probably a gulp plugin that'll handle this for you.
    But test it out first to make sure it works.
    In all my years of doing ASP.NET I've never needed this trick. And the few Angular apps I've done haven't used it either. IIRC it used to be kind of buggy, but that's what some quick research showed me.
    Good luck.
    Based on the comments, you're gonna wanna do some browser testing.
    And option one (though less readable) might still be the more supported option.
    Puneet Aggarwal
    @puneetagg
    Hi..Can anybody tell me why yeoman writes 'ngInject' in start of some functions?
    iamsynthetic
    @iamsynthetic
    @mikesigs some good options there, thanks so much for helping, I'm going to give these a try.
    @puneetagg I hate to say it, but please try google for that one. Or read the link above.
    iamsynthetic
    @iamsynthetic

    so I tried both solutions and neither seem to work. so something is funny. I'm using stateprovider in index.route.js like this:
    $stateProvider
    .state('concept', {
    //url: '/', //just to make sure this page shows up
    //url:'/concept',
    //url:'/#/concept',
    url: '/subdirectory/concept'

    i tried adding the base href to the head of the index.html file:

    <head>
    <meta charset="utf-8">
    <title>title of site</title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width">
    <base href="/subdirectory/" />

    and added the html5mode = true at the end of the index.route.js file:
    $locationProvider.html5Mode(true);
    $urlRouterProvider.otherwise('/');

    inside protractor.conf.js I had to change the baseUrl from localhost to the webserver:
    //baseUrl: 'http://localhost:3000',

    //baseUrl: 'http://samplewebsite.com/subdirectory' - doesn't work
    baseUrl: 'http://samplewebsite.com' - works

    the closest I got was when I click a state (say /concept) the url changes to:
    http://samplewebsite.com/#/subdirectory/concept
    so the hash should be after subdirectory like it is locally

    so at this point I'm kind of just guessing and changing things around experimenting. I build the project before I upload.

    Puneet Aggarwal
    @puneetagg
    @mikesigs Thanks for the reply. I tried googling. Anyways your link helped. Thanks!!
    Mike Sigsworth
    @mikesigs
    @puneetagg Googling turns up results for ngAnnotate rather than ngInject, which is decievingly correct.
    @iamsynthetic If you're getting the hash (i.e #/subdirectory) when clicking links then something isn't configured right with the HTML5 mode. I haven't used this yet either, so you're gonna have to keep hacking away and tell us how you fixed it ;)
    Puneet Aggarwal
    @puneetagg
    @mikesigs Yeah actually!! As I am new to Angular and ES6, so couldn't relate.
    Maker Su
    @makersu
    hi, could anyone suggest datatable? i use Material Design Lite
    Maker Su
    @makersu
    hi, prefer bower install or npm install for external lib?
    Maker Su
    @makersu
    how to include a javascript file in index.html?
    <script src="js/lb-services.js"></script>
    Mike Sigsworth
    @mikesigs
    If you use bower install the the necessary script tags will be be injected by gulp.
    Puneet Aggarwal
    @puneetagg
    Hi..I want to add the ngCookies in my already created project. Is there any way to add dependencies after creating the project?
    neilkyoung
    @neilkyoung
    Hi, has anyone got any pointers on how I am able to get this setup with PHP? I need PHP in order to create a view page that has crawlable meta tags for Facebook and Twitter. When trying to run through a proxy it stops the wiredep routing from working...
    Mike Sigsworth
    @mikesigs
    @puneetagg bower install your_dependency --save
    That's it
    The gulp process handles the rest. That's one of the best things about this generator.