Search code examples
angularjseclipseangular-ui-routerapache-tiles

cannot redirect ui-router state


EDIT I'm trying to use the ui-router, but i cannot get it work... i followed loads of tutorial, questions... i don't know what i'm missing. Here you have some hints, hopefully someone can give me some light Browser data

'use strict';

var app = angular.module("home", ['ui.router']);  

app.config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider){

    $stateProvider
            .state('introduccion', {
                url : "/",
                templateUrl : "views/introduccion.html",
                controller : "views/IntroduccionController"
            })
}]);

The src folder Structure is the following, maybe, i'm not implementing correctly the framework... i'll upload a jsfiddle asap,


Solution

  • You are probably forgetting to add ui-view to your index.html file:

    <body>
      <a ui-sref="introduccion">introduccion</a>
      <div ui-view></div>
    </body>
    

    See a working Plunker.