how can fix data not showing with angularjs and laravelCan one AngularJS controller call another?How does data binding work in AngularJS?How can I post data as form data instead of a request payload?How do search engines deal with AngularJS applications?How do I access the $scope variable in browser's console using AngularJS?AngularJS passing data to $http.get requestHow do I bind to list of checkbox values with AngularJS?How do I use $scope.$watch and $scope.$apply in AngularJS?How to iterate over the keys and values with ng-repeat in AngularJS?AngularJS : Initialize service with asynchronous data
Can I install a back bike rack without attachment to the rear part of the frame?
Is it possible to remotely hack the GPS system and disable GPS service worldwide?
Why did Theresa May offer a vote on a second Brexit referendum?
Dad jokes are fun
The roles understanding in the agile development / Is the PO always right?
Open office space - complaints for noise - how to respond
Adding edges to a TreeForm of an expression
Python program to find Armstrong numbers in a certain range
Why did the person in charge of a principality not just declare themself king?
Popcorn is the only acceptable snack to consume while watching a movie
How to reverse input order?
How to ignore kerning of underbrace in math mode
What is a fully qualified name?
Can I summon an otherworldly creature with Gate without knowing it's true name?
How to patch glass cuts in a bicycle tire?
Did 20% of US soldiers in Vietnam use heroin, 95% of whom quit afterwards?
Is Jon Snow the last of his House?
How to politely tell someone they did not hit "reply to all" in an email?
Lady G's amazing mazings
Why did British Steel have to borrow 120 million pounds (from the government) to cover its ETS obligations?
Why are GND pads often only connected by four traces?
How can I tell if I'm being too picky as a referee?
NIntegrate doesn't evaluate
My players want to grind XP but we're using milestone advancement
how can fix data not showing with angularjs and laravel
Can one AngularJS controller call another?How does data binding work in AngularJS?How can I post data as form data instead of a request payload?How do search engines deal with AngularJS applications?How do I access the $scope variable in browser's console using AngularJS?AngularJS passing data to $http.get requestHow do I bind to list of checkbox values with AngularJS?How do I use $scope.$watch and $scope.$apply in AngularJS?How to iterate over the keys and values with ng-repeat in AngularJS?AngularJS : Initialize service with asynchronous data
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
Is anyone help me, when I start to code to show data in blade with angularJS, data not showing in the page, even the data exists in the console. This following code in my app.js
// app.js
$scope.view_tab = 'shop1';
$scope.changeTab = function(tab)
$scope.view_tab = tab;
// List product
$scope.loadProduct = function () {
$http.get('/getproduct').then(function success(e)
console.log(e.data);
$scope.products = e.data.product;
$scope.totalProduct = $scope.products.length;
$scope.currentPage = 1;
$scope.pageSize = 9;
$scope.sortKey = 'id_kain';
;
//index.blade.php
<div class="shop-top-bar">
<div class="shop-tab nav">
<a ng-class="'active': view_tab == 'shop1'" ng-click="changeTab('shop1')" data-toggle="tab">
<i class="fa fa-table"></i>
</a>
<a ng-class="'active': view_tab == 'shop2'" ng-click="changeTab('shop2')" data-toggle="tab">
<i class="fa fa-list-ul"></i>
</a>
</div>
</div>
<div class="shop-bottom-area mt-35">
<div class="tab-content jump">
<div class="tab-pane" ng-class="active: view_tab == 'shop1'">
<div class="row">
<div ng-repeat="data in filtered = ( products | filter:search ) | orderBy:sortData | itemsPerPage: 9" class="col-xl-4 col-md-6 col-lg-6 col-sm-6">
<div class="product-wrap mb-25 scroll-zoom">
<div class="product-img">
<a ng-click="showForm(data)">
<img class="default-img" ng-src="@ data.gambar_kain[0].gambar_kain " alt="">
<img class="hover-img" ng-src="@ data.gambar_kain[1].gambar_kain " alt="">
</a>
</div>
<div class="product-content text-center">
<h3><a href="">@data.nama_kain</a></h3>
<div class="product-price">
<span>@numberingFormat(data.data_kain[0].harga_kain)</span>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="tab-pane" ng-class="active: view_tab == 'shop2'">
<div dir-paginate="datas in filtered = ( products | filter:search ) | orderBy:sortData | itemsPerPage:9" class="shop-list-wrap mb-30">
<div class="row">
<div class="col-xl-4 col-lg-5 col-md-5 col-sm-6">
<div class="product-wrap">
<div class="product-img">
<a ng-click="showForm(datas)">
<img class="default-img" ng-src="@ datas.gambar_kain[0].gambar_kain " alt="">
<img class="hover-img" ng-src="@ datas.gambar_kain[1].gambar_kain " alt="">
</a>
</div>
</div>
</div>
<div class="col-xl-8 col-lg-7 col-md-7 col-sm-6">
<div class="shop-list-content">
<h3><a href="#">@data.nama_kain</a></h3>
<div class="product-list-price">
<span>@numberingFormat(datas.data_kain[0].harga_kain)</span>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="pro-pagination-style text-center mt-30">
<dir-pagination-controls
max-size="1"
direction-links="true"
boundary-links="true" >
</dir-pagination-controls>
</div>
</div>
Data still not shows in the page, there are not errors in this page, but I don't know how can I fix this.
angularjs laravel
add a comment |
Is anyone help me, when I start to code to show data in blade with angularJS, data not showing in the page, even the data exists in the console. This following code in my app.js
// app.js
$scope.view_tab = 'shop1';
$scope.changeTab = function(tab)
$scope.view_tab = tab;
// List product
$scope.loadProduct = function () {
$http.get('/getproduct').then(function success(e)
console.log(e.data);
$scope.products = e.data.product;
$scope.totalProduct = $scope.products.length;
$scope.currentPage = 1;
$scope.pageSize = 9;
$scope.sortKey = 'id_kain';
;
//index.blade.php
<div class="shop-top-bar">
<div class="shop-tab nav">
<a ng-class="'active': view_tab == 'shop1'" ng-click="changeTab('shop1')" data-toggle="tab">
<i class="fa fa-table"></i>
</a>
<a ng-class="'active': view_tab == 'shop2'" ng-click="changeTab('shop2')" data-toggle="tab">
<i class="fa fa-list-ul"></i>
</a>
</div>
</div>
<div class="shop-bottom-area mt-35">
<div class="tab-content jump">
<div class="tab-pane" ng-class="active: view_tab == 'shop1'">
<div class="row">
<div ng-repeat="data in filtered = ( products | filter:search ) | orderBy:sortData | itemsPerPage: 9" class="col-xl-4 col-md-6 col-lg-6 col-sm-6">
<div class="product-wrap mb-25 scroll-zoom">
<div class="product-img">
<a ng-click="showForm(data)">
<img class="default-img" ng-src="@ data.gambar_kain[0].gambar_kain " alt="">
<img class="hover-img" ng-src="@ data.gambar_kain[1].gambar_kain " alt="">
</a>
</div>
<div class="product-content text-center">
<h3><a href="">@data.nama_kain</a></h3>
<div class="product-price">
<span>@numberingFormat(data.data_kain[0].harga_kain)</span>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="tab-pane" ng-class="active: view_tab == 'shop2'">
<div dir-paginate="datas in filtered = ( products | filter:search ) | orderBy:sortData | itemsPerPage:9" class="shop-list-wrap mb-30">
<div class="row">
<div class="col-xl-4 col-lg-5 col-md-5 col-sm-6">
<div class="product-wrap">
<div class="product-img">
<a ng-click="showForm(datas)">
<img class="default-img" ng-src="@ datas.gambar_kain[0].gambar_kain " alt="">
<img class="hover-img" ng-src="@ datas.gambar_kain[1].gambar_kain " alt="">
</a>
</div>
</div>
</div>
<div class="col-xl-8 col-lg-7 col-md-7 col-sm-6">
<div class="shop-list-content">
<h3><a href="#">@data.nama_kain</a></h3>
<div class="product-list-price">
<span>@numberingFormat(datas.data_kain[0].harga_kain)</span>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="pro-pagination-style text-center mt-30">
<dir-pagination-controls
max-size="1"
direction-links="true"
boundary-links="true" >
</dir-pagination-controls>
</div>
</div>
Data still not shows in the page, there are not errors in this page, but I don't know how can I fix this.
angularjs laravel
I think you forgot to use ng-model and your scope don't match
– Nasser
Mar 24 at 2:20
@Nasser where should I put the ng-model? because that's just show data in dir-paginate
– Abdul Rachman
Mar 24 at 2:36
1
Debugging code is one of the most important things that a developer can do. When a program’s result is unexpected, debugging is a way for a developer to quickly isolate and identify the problem. In the vast majority of cases, once the problem is identified, the solution is clear. But when a developer does not debug their code, the problem becomes much harder to fix.
– georgeawg
Mar 24 at 3:06
@georgeawg so the answer is? you only give advice that I don't need right now
– Abdul Rachman
Mar 24 at 3:31
add a comment |
Is anyone help me, when I start to code to show data in blade with angularJS, data not showing in the page, even the data exists in the console. This following code in my app.js
// app.js
$scope.view_tab = 'shop1';
$scope.changeTab = function(tab)
$scope.view_tab = tab;
// List product
$scope.loadProduct = function () {
$http.get('/getproduct').then(function success(e)
console.log(e.data);
$scope.products = e.data.product;
$scope.totalProduct = $scope.products.length;
$scope.currentPage = 1;
$scope.pageSize = 9;
$scope.sortKey = 'id_kain';
;
//index.blade.php
<div class="shop-top-bar">
<div class="shop-tab nav">
<a ng-class="'active': view_tab == 'shop1'" ng-click="changeTab('shop1')" data-toggle="tab">
<i class="fa fa-table"></i>
</a>
<a ng-class="'active': view_tab == 'shop2'" ng-click="changeTab('shop2')" data-toggle="tab">
<i class="fa fa-list-ul"></i>
</a>
</div>
</div>
<div class="shop-bottom-area mt-35">
<div class="tab-content jump">
<div class="tab-pane" ng-class="active: view_tab == 'shop1'">
<div class="row">
<div ng-repeat="data in filtered = ( products | filter:search ) | orderBy:sortData | itemsPerPage: 9" class="col-xl-4 col-md-6 col-lg-6 col-sm-6">
<div class="product-wrap mb-25 scroll-zoom">
<div class="product-img">
<a ng-click="showForm(data)">
<img class="default-img" ng-src="@ data.gambar_kain[0].gambar_kain " alt="">
<img class="hover-img" ng-src="@ data.gambar_kain[1].gambar_kain " alt="">
</a>
</div>
<div class="product-content text-center">
<h3><a href="">@data.nama_kain</a></h3>
<div class="product-price">
<span>@numberingFormat(data.data_kain[0].harga_kain)</span>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="tab-pane" ng-class="active: view_tab == 'shop2'">
<div dir-paginate="datas in filtered = ( products | filter:search ) | orderBy:sortData | itemsPerPage:9" class="shop-list-wrap mb-30">
<div class="row">
<div class="col-xl-4 col-lg-5 col-md-5 col-sm-6">
<div class="product-wrap">
<div class="product-img">
<a ng-click="showForm(datas)">
<img class="default-img" ng-src="@ datas.gambar_kain[0].gambar_kain " alt="">
<img class="hover-img" ng-src="@ datas.gambar_kain[1].gambar_kain " alt="">
</a>
</div>
</div>
</div>
<div class="col-xl-8 col-lg-7 col-md-7 col-sm-6">
<div class="shop-list-content">
<h3><a href="#">@data.nama_kain</a></h3>
<div class="product-list-price">
<span>@numberingFormat(datas.data_kain[0].harga_kain)</span>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="pro-pagination-style text-center mt-30">
<dir-pagination-controls
max-size="1"
direction-links="true"
boundary-links="true" >
</dir-pagination-controls>
</div>
</div>
Data still not shows in the page, there are not errors in this page, but I don't know how can I fix this.
angularjs laravel
Is anyone help me, when I start to code to show data in blade with angularJS, data not showing in the page, even the data exists in the console. This following code in my app.js
// app.js
$scope.view_tab = 'shop1';
$scope.changeTab = function(tab)
$scope.view_tab = tab;
// List product
$scope.loadProduct = function () {
$http.get('/getproduct').then(function success(e)
console.log(e.data);
$scope.products = e.data.product;
$scope.totalProduct = $scope.products.length;
$scope.currentPage = 1;
$scope.pageSize = 9;
$scope.sortKey = 'id_kain';
;
//index.blade.php
<div class="shop-top-bar">
<div class="shop-tab nav">
<a ng-class="'active': view_tab == 'shop1'" ng-click="changeTab('shop1')" data-toggle="tab">
<i class="fa fa-table"></i>
</a>
<a ng-class="'active': view_tab == 'shop2'" ng-click="changeTab('shop2')" data-toggle="tab">
<i class="fa fa-list-ul"></i>
</a>
</div>
</div>
<div class="shop-bottom-area mt-35">
<div class="tab-content jump">
<div class="tab-pane" ng-class="active: view_tab == 'shop1'">
<div class="row">
<div ng-repeat="data in filtered = ( products | filter:search ) | orderBy:sortData | itemsPerPage: 9" class="col-xl-4 col-md-6 col-lg-6 col-sm-6">
<div class="product-wrap mb-25 scroll-zoom">
<div class="product-img">
<a ng-click="showForm(data)">
<img class="default-img" ng-src="@ data.gambar_kain[0].gambar_kain " alt="">
<img class="hover-img" ng-src="@ data.gambar_kain[1].gambar_kain " alt="">
</a>
</div>
<div class="product-content text-center">
<h3><a href="">@data.nama_kain</a></h3>
<div class="product-price">
<span>@numberingFormat(data.data_kain[0].harga_kain)</span>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="tab-pane" ng-class="active: view_tab == 'shop2'">
<div dir-paginate="datas in filtered = ( products | filter:search ) | orderBy:sortData | itemsPerPage:9" class="shop-list-wrap mb-30">
<div class="row">
<div class="col-xl-4 col-lg-5 col-md-5 col-sm-6">
<div class="product-wrap">
<div class="product-img">
<a ng-click="showForm(datas)">
<img class="default-img" ng-src="@ datas.gambar_kain[0].gambar_kain " alt="">
<img class="hover-img" ng-src="@ datas.gambar_kain[1].gambar_kain " alt="">
</a>
</div>
</div>
</div>
<div class="col-xl-8 col-lg-7 col-md-7 col-sm-6">
<div class="shop-list-content">
<h3><a href="#">@data.nama_kain</a></h3>
<div class="product-list-price">
<span>@numberingFormat(datas.data_kain[0].harga_kain)</span>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="pro-pagination-style text-center mt-30">
<dir-pagination-controls
max-size="1"
direction-links="true"
boundary-links="true" >
</dir-pagination-controls>
</div>
</div>
Data still not shows in the page, there are not errors in this page, but I don't know how can I fix this.
angularjs laravel
angularjs laravel
edited Mar 24 at 2:53
georgeawg
36.6k115471
36.6k115471
asked Mar 24 at 2:10
Abdul RachmanAbdul Rachman
11
11
I think you forgot to use ng-model and your scope don't match
– Nasser
Mar 24 at 2:20
@Nasser where should I put the ng-model? because that's just show data in dir-paginate
– Abdul Rachman
Mar 24 at 2:36
1
Debugging code is one of the most important things that a developer can do. When a program’s result is unexpected, debugging is a way for a developer to quickly isolate and identify the problem. In the vast majority of cases, once the problem is identified, the solution is clear. But when a developer does not debug their code, the problem becomes much harder to fix.
– georgeawg
Mar 24 at 3:06
@georgeawg so the answer is? you only give advice that I don't need right now
– Abdul Rachman
Mar 24 at 3:31
add a comment |
I think you forgot to use ng-model and your scope don't match
– Nasser
Mar 24 at 2:20
@Nasser where should I put the ng-model? because that's just show data in dir-paginate
– Abdul Rachman
Mar 24 at 2:36
1
Debugging code is one of the most important things that a developer can do. When a program’s result is unexpected, debugging is a way for a developer to quickly isolate and identify the problem. In the vast majority of cases, once the problem is identified, the solution is clear. But when a developer does not debug their code, the problem becomes much harder to fix.
– georgeawg
Mar 24 at 3:06
@georgeawg so the answer is? you only give advice that I don't need right now
– Abdul Rachman
Mar 24 at 3:31
I think you forgot to use ng-model and your scope don't match
– Nasser
Mar 24 at 2:20
I think you forgot to use ng-model and your scope don't match
– Nasser
Mar 24 at 2:20
@Nasser where should I put the ng-model? because that's just show data in dir-paginate
– Abdul Rachman
Mar 24 at 2:36
@Nasser where should I put the ng-model? because that's just show data in dir-paginate
– Abdul Rachman
Mar 24 at 2:36
1
1
Debugging code is one of the most important things that a developer can do. When a program’s result is unexpected, debugging is a way for a developer to quickly isolate and identify the problem. In the vast majority of cases, once the problem is identified, the solution is clear. But when a developer does not debug their code, the problem becomes much harder to fix.
– georgeawg
Mar 24 at 3:06
Debugging code is one of the most important things that a developer can do. When a program’s result is unexpected, debugging is a way for a developer to quickly isolate and identify the problem. In the vast majority of cases, once the problem is identified, the solution is clear. But when a developer does not debug their code, the problem becomes much harder to fix.
– georgeawg
Mar 24 at 3:06
@georgeawg so the answer is? you only give advice that I don't need right now
– Abdul Rachman
Mar 24 at 3:31
@georgeawg so the answer is? you only give advice that I don't need right now
– Abdul Rachman
Mar 24 at 3:31
add a comment |
1 Answer
1
active
oldest
votes
As I know there is two way to show data in Angular JS when you define the scopes then you need the ng-bind or ng-model to show data in the front end.
1- AngularJS Data Binding
live Example https://www.w3schools.com/code/tryit.asp?filename=G2DQQ2GSJ3EO
<div ng-app="myApp" ng-controller="myCtrl">
<p ng-bind="firstname "></p>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope)
$scope.firstname = "John will be change";
);
</script>
2-AngularJS ng-model Directive
Live Example https://www.w3schools.com/code/tryit.asp?filename=G2DQQEUEPSOC
<div ng-app="myApp" ng-controller="myCtrl">
Name: <input ng-model="name">
<h1>You entered: name</h1>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope)
$scope.name = "John Doe";
);
</script>
NOTE: try with static data and then check that you have valid data to make it dynamic
I hope this helps you!
did you attend to answers?
– Nasser
Mar 25 at 4:27
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55320139%2fhow-can-fix-data-not-showing-with-angularjs-and-laravel%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
As I know there is two way to show data in Angular JS when you define the scopes then you need the ng-bind or ng-model to show data in the front end.
1- AngularJS Data Binding
live Example https://www.w3schools.com/code/tryit.asp?filename=G2DQQ2GSJ3EO
<div ng-app="myApp" ng-controller="myCtrl">
<p ng-bind="firstname "></p>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope)
$scope.firstname = "John will be change";
);
</script>
2-AngularJS ng-model Directive
Live Example https://www.w3schools.com/code/tryit.asp?filename=G2DQQEUEPSOC
<div ng-app="myApp" ng-controller="myCtrl">
Name: <input ng-model="name">
<h1>You entered: name</h1>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope)
$scope.name = "John Doe";
);
</script>
NOTE: try with static data and then check that you have valid data to make it dynamic
I hope this helps you!
did you attend to answers?
– Nasser
Mar 25 at 4:27
add a comment |
As I know there is two way to show data in Angular JS when you define the scopes then you need the ng-bind or ng-model to show data in the front end.
1- AngularJS Data Binding
live Example https://www.w3schools.com/code/tryit.asp?filename=G2DQQ2GSJ3EO
<div ng-app="myApp" ng-controller="myCtrl">
<p ng-bind="firstname "></p>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope)
$scope.firstname = "John will be change";
);
</script>
2-AngularJS ng-model Directive
Live Example https://www.w3schools.com/code/tryit.asp?filename=G2DQQEUEPSOC
<div ng-app="myApp" ng-controller="myCtrl">
Name: <input ng-model="name">
<h1>You entered: name</h1>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope)
$scope.name = "John Doe";
);
</script>
NOTE: try with static data and then check that you have valid data to make it dynamic
I hope this helps you!
did you attend to answers?
– Nasser
Mar 25 at 4:27
add a comment |
As I know there is two way to show data in Angular JS when you define the scopes then you need the ng-bind or ng-model to show data in the front end.
1- AngularJS Data Binding
live Example https://www.w3schools.com/code/tryit.asp?filename=G2DQQ2GSJ3EO
<div ng-app="myApp" ng-controller="myCtrl">
<p ng-bind="firstname "></p>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope)
$scope.firstname = "John will be change";
);
</script>
2-AngularJS ng-model Directive
Live Example https://www.w3schools.com/code/tryit.asp?filename=G2DQQEUEPSOC
<div ng-app="myApp" ng-controller="myCtrl">
Name: <input ng-model="name">
<h1>You entered: name</h1>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope)
$scope.name = "John Doe";
);
</script>
NOTE: try with static data and then check that you have valid data to make it dynamic
I hope this helps you!
As I know there is two way to show data in Angular JS when you define the scopes then you need the ng-bind or ng-model to show data in the front end.
1- AngularJS Data Binding
live Example https://www.w3schools.com/code/tryit.asp?filename=G2DQQ2GSJ3EO
<div ng-app="myApp" ng-controller="myCtrl">
<p ng-bind="firstname "></p>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope)
$scope.firstname = "John will be change";
);
</script>
2-AngularJS ng-model Directive
Live Example https://www.w3schools.com/code/tryit.asp?filename=G2DQQEUEPSOC
<div ng-app="myApp" ng-controller="myCtrl">
Name: <input ng-model="name">
<h1>You entered: name</h1>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope)
$scope.name = "John Doe";
);
</script>
NOTE: try with static data and then check that you have valid data to make it dynamic
I hope this helps you!
answered Mar 24 at 3:50
NasserNasser
1
1
did you attend to answers?
– Nasser
Mar 25 at 4:27
add a comment |
did you attend to answers?
– Nasser
Mar 25 at 4:27
did you attend to answers?
– Nasser
Mar 25 at 4:27
did you attend to answers?
– Nasser
Mar 25 at 4:27
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55320139%2fhow-can-fix-data-not-showing-with-angularjs-and-laravel%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I think you forgot to use ng-model and your scope don't match
– Nasser
Mar 24 at 2:20
@Nasser where should I put the ng-model? because that's just show data in dir-paginate
– Abdul Rachman
Mar 24 at 2:36
1
Debugging code is one of the most important things that a developer can do. When a program’s result is unexpected, debugging is a way for a developer to quickly isolate and identify the problem. In the vast majority of cases, once the problem is identified, the solution is clear. But when a developer does not debug their code, the problem becomes much harder to fix.
– georgeawg
Mar 24 at 3:06
@georgeawg so the answer is? you only give advice that I don't need right now
– Abdul Rachman
Mar 24 at 3:31