montado el ui-router con oclazyload
This commit is contained in:
parent
755a9c936a
commit
9d5885777a
|
@ -9,10 +9,7 @@ core.module.config(function($stateProvider, $urlRouterProvider) {
|
||||||
$stateProvider
|
$stateProvider
|
||||||
.state('index', {
|
.state('index', {
|
||||||
url: "/index",
|
url: "/index",
|
||||||
component:'customer.add',
|
template :'<customer-add></customer-add>',
|
||||||
templateProvider: function(){
|
|
||||||
console.log("hello");
|
|
||||||
},
|
|
||||||
resolve: {
|
resolve: {
|
||||||
loader: function($ocLazyLoad, $q){
|
loader: function($ocLazyLoad, $q){
|
||||||
return $q((resolve) => {
|
return $q((resolve) => {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
<div>index</div>
|
<div>index from component</div>
|
|
@ -1,7 +1,7 @@
|
||||||
import template from './index.html';
|
import template from './index.html';
|
||||||
import {module} from '../../module';
|
import {module} from '../../module';
|
||||||
|
|
||||||
export const NAME = 'customer.add';
|
export const NAME = 'customerAdd';
|
||||||
export const COMPONENT = {
|
export const COMPONENT = {
|
||||||
template: template,
|
template: template,
|
||||||
controller: function() {
|
controller: function() {
|
||||||
|
@ -10,7 +10,5 @@ export const COMPONENT = {
|
||||||
};
|
};
|
||||||
|
|
||||||
module.component(NAME, COMPONENT);
|
module.component(NAME, COMPONENT);
|
||||||
module.factory('hello',function(){return true});
|
|
||||||
module.controller('pepito',function(hello){
|
|
||||||
console.log(hello);
|
|
||||||
});
|
|
||||||
|
|
29
index.html
29
index.html
|
@ -3,25 +3,20 @@
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title>Salix</title>
|
<title>Salix</title>
|
||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
|
|
||||||
<link rel="stylesheet" href="https://code.getmdl.io/1.2.1/material.indigo-pink.min.css">
|
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app">
|
<div id="app">
|
||||||
{{1+1}}
|
|
||||||
<div ui-view></div>
|
<div ui-view></div>
|
||||||
<a ui-sref="index">index</a>
|
<a ui-sref="index">index</a>
|
||||||
<a ui-sref="add">add</a>
|
<a ui-sref="add">add</a>
|
||||||
<a ui-sref="edit">edit</a>
|
<a ui-sref="edit">edit</a>
|
||||||
<a ui-sref="delete">delete</a>
|
<a ui-sref="delete">delete</a>
|
||||||
<vn-button text="texto del boton"></vn-button><br>
|
|
||||||
<vn-check text="texto del text" ></vn-check><br>
|
</div>
|
||||||
<vn-radio text="texto del radio"></vn-radio><br>
|
|
||||||
<vn-textfield text="prueba" type="email"></vn-textfield><br>
|
|
||||||
<vn-txt text="hola mundo"></vn-txt>
|
<script type="text/javascript" src="build/salix.app.js" selector="#app"></script>
|
||||||
</div>
|
|
||||||
<script type="text/javascript" src="build/salix.app.js" selector="#app"></script>
|
|
||||||
<script defer src="https://code.getmdl.io/1.2.1/material.min.js"></script>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue