Home Ask Login Register

Developers Planet

Your answer is one click away!

chai February 2016

Ionic project Basic Structure with angularjs?

I am new to the ionic, i started to learn ionic,i am trying to create structure for ionic, i have added the ionic links.I created the separate html files and module file and config files and all, actually i want to load the separate html file with links....i added the code bellow..


<!DOCTYPE html>
<html ng-app="SomeApp">
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<link data-require="ionic@1.0.0-beta.1" data-semver="1.0.0-beta.1" rel="stylesheet" href="http://code.ionicframework.com/1.0.0-beta.13/css/ionic.css" />
<script data-require="ionic@1.0.0-beta.1" data-semver="1.0.0-beta.1" src="http://code.ionicframework.com/1.0.0-beta.13/js/ionic.bundle.js"></script>
    <script src="Module.js"></script>
    <script src="js/Core/config.js"></script>
    <script src="js/Controllers/WorkCtrl.js"></script>


var ionApp = angular.module("SomeApp",['ionic']);


        .state('home', {
            views: {
                'menuContent': {
                    templateUrl: 'views/Home/Home.html'
        .state('Work', {
            views: {
                'menuContent': {
                    templateUrl: 'views/Home/Work.html'
        .state('Personal', {
            views: {
                'menuContent': {
                    templateUrl: 'views/Home/Personal.html'


Compa88 February 2016

Can you write your folders structure? Are you sure to have the HTML file in a folder Home? I think that your tamplateUrl is not correct!

Compa88 February 2016

Try : .state('home', { url:'/Home', templateUrl: 'views/Home/Home.html' })

TemplateUrl in the same level of URL in the json when you set the state...

Post Status

Asked in February 2016
Viewed 1,942 times
Voted 10
Answered 2 times


Leave an answer

Quote of the day: live life