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
|
||||
.state('index', {
|
||||
url: "/index",
|
||||
component:'customer.add',
|
||||
templateProvider: function(){
|
||||
console.log("hello");
|
||||
},
|
||||
template :'<customer-add></customer-add>',
|
||||
resolve: {
|
||||
loader: function($ocLazyLoad, $q){
|
||||
return $q((resolve) => {
|
||||
|
|
|
@ -1 +1 @@
|
|||
<div>index</div>
|
||||
<div>index from component</div>
|
|
@ -1,7 +1,7 @@
|
|||
import template from './index.html';
|
||||
import {module} from '../../module';
|
||||
|
||||
export const NAME = 'customer.add';
|
||||
export const NAME = 'customerAdd';
|
||||
export const COMPONENT = {
|
||||
template: template,
|
||||
controller: function() {
|
||||
|
@ -10,7 +10,5 @@ export const COMPONENT = {
|
|||
};
|
||||
|
||||
module.component(NAME, COMPONENT);
|
||||
module.factory('hello',function(){return true});
|
||||
module.controller('pepito',function(hello){
|
||||
console.log(hello);
|
||||
});
|
||||
|
||||
|
||||
|
|
13
index.html
13
index.html
|
@ -3,25 +3,20 @@
|
|||
|
||||
<head>
|
||||
<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>
|
||||
<body>
|
||||
<div id="app">
|
||||
{{1+1}}
|
||||
|
||||
<div ui-view></div>
|
||||
<a ui-sref="index">index</a>
|
||||
<a ui-sref="add">add</a>
|
||||
<a ui-sref="edit">edit</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>
|
||||
<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>
|
||||
|
||||
</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>
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue