Created
October 16, 2017 10:49
-
-
Save gmittica/07f64d7fc9e0b53e9af0fefb3615c99e to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/rejixi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://rawgit.com/angular/bower-angular/master/angular.min.js"></script> | |
<script src="https://code.jquery.com/jquery.min.js"></script> | |
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> | |
<script src="http://unpkg.com/@uirouter/angularjs@1.0.7/release/angular-ui-router.min.js"></script> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body ng-app="myApp"> | |
<div class="container"> | |
<div class="well"> | |
<a ui-sref="user-list" class="btn btn-link">Home</a> | |
<a ui-sref="user-contact" class="btn btn-link">Contact</a> | |
</div> | |
<ui-view></ui-view> | |
</div> | |
<script id="jsbin-javascript"> | |
angular.module("myApp", ['users']) | |
.config(['$urlRouterProvider', function($urlRouterProvider) { | |
$urlRouterProvider.otherwise('/'); | |
}]); | |
angular.module("users", ['ui.router']) | |
.config(['$stateProvider', function($stateProvider) { | |
var s1 = { | |
name: 'user-list', | |
url: '/', | |
template: '<h1>This is a view</h1>' | |
}; | |
var s2 = { | |
name: 'user-contact', | |
url: '/users/contact', | |
template: '<h1>This is another view</h1>' | |
} | |
$stateProvider.state(s1); | |
$stateProvider.state(s2); | |
}]); | |
</script> | |
<script id="jsbin-source-html" type="text/html"><!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://rawgit.com/angular/bower-angular/master/angular.min.js"><\/script> | |
<script src="https://code.jquery.com/jquery.min.js"><\/script> | |
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"><\/script> | |
<script src="//unpkg.com/@uirouter/angularjs@1.0.7/release/angular-ui-router.min.js"><\/script> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body ng-app="myApp"> | |
<div class="container"> | |
<div class="well"> | |
<a ui-sref="user-list" class="btn btn-link">Home</a> | |
<a ui-sref="user-contact" class="btn btn-link">Contact</a> | |
</div> | |
<ui-view></ui-view> | |
</div> | |
</body> | |
</html></script> | |
<script id="jsbin-source-javascript" type="text/javascript">angular.module("myApp", ['users']) | |
.config(['$urlRouterProvider', function($urlRouterProvider) { | |
$urlRouterProvider.otherwise('/'); | |
}]); | |
angular.module("users", ['ui.router']) | |
.config(['$stateProvider', function($stateProvider) { | |
var s1 = { | |
name: 'user-list', | |
url: '/', | |
template: '<h1>This is a view</h1>' | |
}; | |
var s2 = { | |
name: 'user-contact', | |
url: '/users/contact', | |
template: '<h1>This is another view</h1>' | |
} | |
$stateProvider.state(s1); | |
$stateProvider.state(s2); | |
}]); | |
</script></body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module("myApp", ['users']) | |
.config(['$urlRouterProvider', function($urlRouterProvider) { | |
$urlRouterProvider.otherwise('/'); | |
}]); | |
angular.module("users", ['ui.router']) | |
.config(['$stateProvider', function($stateProvider) { | |
var s1 = { | |
name: 'user-list', | |
url: '/', | |
template: '<h1>This is a view</h1>' | |
}; | |
var s2 = { | |
name: 'user-contact', | |
url: '/users/contact', | |
template: '<h1>This is another view</h1>' | |
} | |
$stateProvider.state(s1); | |
$stateProvider.state(s2); | |
}]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment