0

Hi I have created a angularjs+webix project wherein I will be adding CRUD operations.

I have a app.js file where I put the routing:

var app =  angular.module('app', [ "webix", "ui.router" ]);

app.config(function($stateProvider) {
    $stateProvider
    
    .state("/create", {
        templateUrl : "/app/views/CreateTemplate.html",
        controller : 'CreateController'
    })

    .state("/update", {
        templateUrl : "/app/views/UpdateTemplate.html",
        controller : 'UpdateController'
    })
    
    .state("/delete", {
        templateUrl : "/app/views/DeleteTemplate.html",
        controller : 'DeleteController'
    })
});

My index.html file below:

<body ng-app="app">
  
  <div class="container">

    <div class="sidenav">
      <a ui-sref="create">Create</a>
      <a ui-sref="update">Update</a>
      <a ui-sref="delete">Delete</a>
    </div>


  </div>

</body>

My index file contains a navbar. Whenever I click on either Create or Update it should show that particular view i.e. If I click on Create It should load Create view. But in doing so I am unsuccessful.

3
  • Did you check out stackoverflow.com/questions/28265230/…? Commented Jan 13, 2022 at 14:15
  • Yes I did. But the issue still persists with CORS issue. Commented Jan 14, 2022 at 2:58
  • The solutions to CORS issues are very straightforward and among the most well documented. Search for solutions along those lines and you should have a resolution quickly. Commented Jan 14, 2022 at 3:11

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.