Hi I've just came across this tutorial. It's this particular app is what I'm looking for. http://scotch.io/tutorials/angularjs-multi-step-form-using-ui-router
However I want this particular view to be in the middle of my already existing app. Is this is known as nested views? However when I tried to implement this app into my website...the page wouldn't load. I think this is due to the routing at script.js? Is it possible to use both $routeProvider and $Stateprovider?
//create our angular app and inject ngroute,nganimate and uirouter
var financeApp = angular.module('financeApp', ['ngRoute','ngAnimate','ui.router']);
// configure our routes
financeApp.config(function($routeProvider, $urlRouterProvider, $stateProvider) {
$routeProvider
// route for the home page
.when('/', {
templateUrl : 'partials/main.html',
controller : 'mainController'
})
// route for the about page
.when('/about', {
templateUrl : 'partials/about.html',
})
// route for the contact page
.when('/contact', {
templateUrl : 'partials/contact.html',
})
.otherwise({
redirectTo: '/'
})
});
$stateProvider
// route to show our basic form (/form)
.state('form', {
url: '/form',
templateUrl: 'form.html',
controller: 'formController'
})
// nested states
// each of these sections will have their own view
// url will be nested (/form/profile)
.state('form.profile', {
url: '/profile',
templateUrl: 'partials/form-profile.html'
// url will be /form/interests
.state('form.interests', {
url: '/interests',
templateUrl: 'form-interests.html'
})
// url will be /form/payment
.state('form.payment', {
url: '/payment',
templateUrl: 'form-payment.html'
});
// catch all route
// send users to the form page
$urlRouterProvider.otherwise('/form/profile');
})
Basically I want a changeable view in the middle of one static page. I'm not quite sure how to go about it. Click on a button in the middle, takes you to another view in the middle, click on a button, takes you to another view in the middle. etc
This is my angularjs website Where the main image is...I would like there to be a form in the middle.
I am trying to achieve the following: Please forgive the rudimentary drawing on MSpaint...