GithubHelp home page GithubHelp logo

Comments (10)

christopherthielen avatar christopherthielen commented on April 19, 2024 3

Yep, I'm working on it. rc.5 introduced some breaking changes for ui-router (also totally changed how apps should be bootstrapped)

from quickstart-ng2.

christopherthielen avatar christopherthielen commented on April 19, 2024 3

Before next Friday; hopefully sooner

from quickstart-ng2.

christopherthielen avatar christopherthielen commented on April 19, 2024 2

@reyramos thanks for PR.

There are some major changes for ui-router-ng2 bootstrap coming soon because of NgModule!

from quickstart-ng2.

christopherthielen avatar christopherthielen commented on April 19, 2024 2

ui-router 1.0.0-beta.2 is released with NgModule support.

/**
* Define the app's root NgModule
*
* This module:
* - imports the other initial (non-lazy-loaded) application modules
* - provides the UIRouter instance
* - registers router configuration
* - enables hash urls ("#/foo")
* - provides a module lazy loading strategy (SystemJSModuleLoader)
* - registers states
* - bootstraps a ui-view
*/
@UIRouterModule({
imports: [
BrowserModule,
FooModule,
BarModule,
// BazModule will be lazy loaded
],
providers: [
// Provide the UIRouter instance to the root module
provideUIRouter({ configClass: MyUIRouterConfig, useHash: true }),
// Provide a lazy loading strategy
{provide: NgModuleFactoryLoader, useClass: SystemJsNgModuleLoader}
],
// provide the initial states
states: MAIN_STATES,
// bootstrap a UIView component
bootstrap: [UIView]
})
export class AppModule { }

Lazy loading of NgModule is now supported. See:

  • // This is the Future State for lazy loading the BazModule
    { name: 'app.baz', url: '/baz', lazyLoad: loadNgModule('src/baz/baz.module') }
  • import {UIRouterModule} from "ui-router-ng2";
    import {SharedModule} from "../.module";
    import {BAZ_STATES} from "./baz.states";
    /** The Baz NgModule. */
    @UIRouterModule({
    imports: [SharedModule],
    states: BAZ_STATES
    })
    export default class BazModule { }

from quickstart-ng2.

reyramos avatar reyramos commented on April 19, 2024 1

I've submitted a pull request with updated module to RC5, check it out

from quickstart-ng2.

demisx avatar demisx commented on April 19, 2024

Thank you for excellent news Chris. 👍 We are refactoring our rc.4 app as well.

from quickstart-ng2.

kolkov avatar kolkov commented on April 19, 2024

Hi! Thank you for your work, @christopherthielen
I was started my new big project on Angular1 and ui-router one month ago, but now I'm trying to completely rewrite it on Angular2 and ui-router-ng2.
I look forward to updates!

from quickstart-ng2.

demisx avatar demisx commented on April 19, 2024

@christopherthielen Any rough ETA on this? Don't mean to rush, just trying to get an idea for some internal planning. Thank you for all your excellent work.

from quickstart-ng2.

reyramos avatar reyramos commented on April 19, 2024

Provided a webpack example forked from this repo, thanks for the quickstart.

from quickstart-ng2.

demisx avatar demisx commented on April 19, 2024

Thank you so much for upgrading to the latest Angular 2 rc6!

from quickstart-ng2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.