Ionic popup $scope.var returned undefined?

$scope.openAddNewSubPopup = function(){
       var addNewSub = ${
       scope: $scope,
       template: '<label class="item item-input"><input type="text" model="addNewSubItemValue"></label>'

    addNewSub.then(function(res) {

Anyone have idea why I’m getting undefined here? when I tried to do {{addNewSubItemValue}} in the template, it did bind well.


As it says in the documentation, you’ll want to define a $ = {} before your $, then have ng-model="data.addNewSubItemValue. Check out the docs :smile: