-3

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,

txomin
  • 177
  • 2
  • 3
  • 15
  • It's tough to describe why it "doesn't work" right now since your code is broken regardless; I can't guarantee if your IIFE will ever execute to begin with. – Makoto May 14 '16 at 17:46
  • just provide a jsfiddle or a plnkr of you code....... – Avijeet Ghosh May 14 '16 at 17:49
  • Are you getting any errors in the console? Did you include every JS file in the index? so much can go wrong here... – Muli Yulzary May 14 '16 at 18:21
  • Sorry, i thought i uploaded the image... i just did it. I'm not having any errors, when i click on the "Change view" text it does nothing. I have a service js also, but it doesn't have any relation in here, does it? – txomin May 14 '16 at 23:19

1 Answers1

0

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.

brians69
  • 485
  • 2
  • 11
  • 24