Questions tagged [angular-new-router]

A new router for Angular 1.5 and 2.0, written with TypeScript. Deprecated / Defunct / Non-working.

A new router for Angular 1.5 and 2.0, written with TypeScript. Deprecated / Defunct / Non-working.

https://github.com/angular/router

If you are interested in the recommended component router, please look in the Angular 2 repository at https://github.com/angular/angular/tree/2.4.x/modules/%40angular/router

33 questions
2
votes
3 answers

Angular 1.4 + ngNewRouter + ES6 : Cannot read property '$routeConfig' of undefined

I am currently trying to throw together a basic working example of an Angular 1.4 app written with both the new router as well as ECMAScript 6. I have been fiddling with this code non stop and I don't understand why I am getting the error that is…
datatype_void
  • 433
  • 5
  • 23
1
vote
0 answers

How will component() and the New Angular Router work together in 1.5?

I've read through both proposals individually but am having trouble piecing them together. So with component() we can set the bindings property to get data from outside of the component. However, it seems with the new angular router, there is no…
kennyg
  • 999
  • 2
  • 10
  • 23
1
vote
1 answer

does angular2-beta.0 really cache the view?

SPEED & PERFORMANCE Angular 2 is dramatically faster than Angular 1 with support for fast initial loads through server-side pre-rendering, offline compile for fast startup, and ultrafast change detection and view caching for smooth virtual…
1
vote
2 answers

Angular New Router remove /# from URL

I'm on angular 1.4.6 and new router version 0.5.3 and wanted to remove the '/#' from the url. Can't seem to find anything about it on the Internet. Edit: $locationProvider.html5mode(true); gives the following error: Uncaught Error:…
1
vote
2 answers

Property '$routeConfig' does not exist on type '($router: any) => void'

I am trying to use the angular new router in v1.4. I am using Typescript. When I try to compile, I get the following error. Property '$routeConfig' does not exist on type '($router: any) => void' This is my code ///
Muthukumar
  • 8,679
  • 17
  • 61
  • 86
1
vote
2 answers

How to change router by typescript in angular2?

For example, I use router-link like this:
  • Start
  • But how can I change the router to /start by typescript?
    gastrodia
    • 11
    • 1
    • 3
    1
    vote
    0 answers

    AngularJS lazy loading components with ngNewRoute

    I want to make an application that uses AngularJS new router. I decided to wrap every component to a new module and lazily load the component (module, controller and template) with ocLazyLoad when user changed the route to that component. I think I…
    0
    votes
    2 answers

    Angular route and child route management

    Somebody can tell me if is possible to open a child route in a new view instead of opening right under it? If so how and how to comeback to the father route previous state of navigation?
    0
    votes
    1 answer

    Can't separate angular components in angular 1

    I'm trying to organize my code a bit differently than the tutorial for component routing. Quite simply I want to my app to have this structure. app.js -components/ +-settings/ +-settings.js +-general/ +-generalSettings.js I'm using Angular…
    Derek Adair
    • 21,846
    • 31
    • 97
    • 134
    0
    votes
    0 answers

    Angular new router how to define a default route when no mapped route

    I'm using angular new router and configured it as following: this.$router.config([ {path: '/', component: 'home', as:'home'}, {path: '/home', component: 'home'}, {path: '/home/:type/:id', component:…
    Dor Cohen
    • 16,769
    • 23
    • 93
    • 161
    0
    votes
    1 answer

    Angular new router force components folder under root

    I'm trying to use angular new router in my Angular 1.5 (+ Typescript) project. I followed the getting started manual but it forces me to have all my HTML components folder right under my root folder: Could not instantiate controller HomeController …
    Dor Cohen
    • 16,769
    • 23
    • 93
    • 161
    0
    votes
    1 answer

    Setting the script tag to access the new angular router

    I am starting to play with the new angular router. I did an npm install as was noted https://www.npmjs.com/package/angular-new-router. However, I am having difficulty setting up the script tag. I am playing around with a tutorial to work with the…
    Winnemucca
    • 3,309
    • 11
    • 37
    • 66
    0
    votes
    0 answers

    Set $TemplateUrl within controller (angular-new-router in angular 1.4)

    Based on this video@ng-vegas: New Angular Router: Bridging the Gap Between 1.x and 2, the presenter said totally 3 ways to define controller and template in new router. 3rd one(starting at 8:40) allow us to define custom template url inside a…
    Ron
    • 6,037
    • 4
    • 33
    • 52
    0
    votes
    1 answer

    Angular-new-router not found with browserify

    I am setting up an angular project with browserify. I have a gulp task that take all vendor modules from bower_components directory and put them in a bundle: gulp.task('dependencies', function () { return browserify({ entries:…
    user1012750
    • 133
    • 12
    0
    votes
    1 answer

    new angular router - autoscroll equivalent

    ui-router and the 1.4 angular router supported autoscroll="true" to enable the page to scroll to top of page on navigation to another route. Does anyone know how to do this with the new angular router? ng-outlet does not appear to have an…
    gatapia
    • 3,574
    • 4
    • 40
    • 48