Answer the question
In order to leave comments, you need to log in
Is AngularJS possible without routing?
Is it possible to implement a simple application with one controller, without ui.router and so on, there is an api and a controller that works on it, but now it uses ui.router for this
angular.module('Monorythm')
.config(['$stateProvider',function ($stateProvider) {
$stateProvider
.state('catalog',{
url: '/catalog',
templateUrl: 'views/catalog.tmpl.html',
controller: 'CatalogController'
})
.state('catalog.template',{
url: '/tempflate/:templateId',
templateUrl: 'views/catalog.template.tmpl.html',
controller: 'TemplateController',
needAuth:false,
isCalculation: true
});
}])
Answer the question
In order to leave comments, you need to log in
Yes, it's possible.
1. Create a component angular.module('Monorythm').component('monorythm', {})
Here
is the component documentation https://docs.angularjs.org/guide/component
component
3. Then bootstrap the application angular.bootstrap(document.body, ['Monorythm']);
Voila.
I drafted an example for you
https://jsfiddle.net/sneas/gtrwzsn1/525/
but this one I found on the Internet using the Google search engine
https://jsfiddle.net/langdonx/gtrwzsn1/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question